If this is not mapped to a database, I would make it null:
public class Customer { public int Id { get; set; } public string FirstName { get; set; } public DateTime? Birthdate { get; set; } }
EDIT:
If it is matched, then I would just make it a value of zero:
public DateTime? BirthdateDisplay { get { if (this.Birthdate == default(DateTime)) return null; else return this.Birthdate; } }
Steve danner
source share