[Mono-list] Suggestion: warning "member variable not initialized"

Marcus mathpup@mylinuxisp.com
Sat, 7 Jun 2003 15:35:43 -0500


On the contrary, "structs should be designed to consider the default 
initialization a valid state." In particular, the default initialization sets 
"all value type fields to their default value and all reference type fields 
to null."

In the particular case of System.DateTime, a default-initialized instance 
corresponds to 1/1/0001 12:00:00 AM.


On Saturday 07 June 2003 3:23 pm, Brian Deacon wrote:

> Umm... no.
>
> Some [ValueType] types don't even have an equivalent to 0 or null.
> e.g., System.DateTime, IIRC.