Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

can we assign null value to value type in c#?

Answer Posted / aditya

Nullable type is introduced in .NET 2.0. Before 2.0 it was
not possible to assign null to value types.
This was possible with the introduction of Generics in 2.0
and the it would be something like this...

System.Nullable<int> x = new System.Nullable<int>;

or

int? salary = null (new type modifier in 2.0)

Is This Answer Correct ?    30 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you set a class path?

836


What are partial types in c#?

850


Is concurrent queue thread safe?

859


What is difference between singleordefault and firstordefault?

864


What is a console application in c#?

913


Which is faster abstract class or interface in c#?

936


what are some characteristics of an array?

906


What is web forms in c#?

880


Is php better than c#?

885


What is singleordefault?

860


What is the difference between dynamic and var in c#?

886


Can you instantiate an abstract class c#?

858


What is the major difference between a custom control and user control?

996


What are get and set in c#?

959


Which are the access modifiers available in c#?

899