views:

301

answers:

3

For political correctness, I would like to know if there is a way to instantiate a date so that it contains the lowest date value possible in c# net v2.

+18  A: 

Try DateTime.MinValue. This is the lowest possible value for a DateTime instance in the CLR. It is a language independent value.

JaredPar
thanks, exactly what I wanted. no way records could possibly have been created before time itself :)
JL
You'll find most value types have similar, useful static properties like this.
Dan Diplo
+2  A: 

DateTime myDate = DateTime.MinValue;

Mitchel Sellers
+7  A: 

A newly constructed DateTime object also handily constructs by default to MinValue.

DanDan