Adding format to properties
- by chris
I have an object with a couple of DateTime properties:
public DateTime Start_Date { get; set; }
public DateTime? End_Date { get; set; }
I would like to set a format for each of these, along the lines of
Start_Date.ToString("M/d/yyyy hh:mm tt")
Do I have to code the get, or is there an elegant way to do this?