The variable must have a value, can not be empty. Sometimes it would be convenient, it was possible to give a "null" (for example, undefined) variable. . NET 2.0 Nullable general use, that makes this possible. The next two lines to produce exactly the same purpose:
NullablemyVar = null;
or use this...
int? myVar = null;
By one ? According to a definition of the variable, the compiler will wrap a Nullablegeneric type.
No comments:
Post a Comment