,
Share this with your friends 
 

In some scenario we require to have store null values in Valu types.

6 ratings Views 560 
Author: Vivek_c87b9c16 (Vivek Bahadur)  View Profile |  View other solutions by this author

Question / Problem


In some scenario we require to have store null values in Valu types.

Solution

Now from C# 2.0 we can store null values even in Value types.
Just declare the type with suffix ?
Example:
string StringValue=null; //Possible
int IntValue=null; // Not Possible
int? IntValue=null; //Possible


Applies to

C# 2008

Rank It

Login to rank it

Report


Advertisement