Search code examples
c#static-members

Best way to get a static DateTime value


Is there a better way to get a static DateTime value in C# than the following?

public static DateTime StartOfRecordedHistory = DateTime.Parse("2004-01-01");

Thanks!


Solution

  • public static DateTime StartOfRecordedHistory = new DateTime(2004, 1, 1);