Nullable value types

In c# 2.0 we are given with provision of storing null values in value types also which was not possible in earlier version

In earlier version null values can be stored only in reference types but now in value types also null values can stored which requires type to be declared  suffexing with ?

Nullable value types(2.0)
string s=null; //valid
int x=null; // invalid
int?x=null;//valid

This feature provides important interaction with Sql database

Ebook Download
View all
Learn
View all