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 / narayana

Yes We can Assign
A nullable int can store null. Nullable types in the C#
language can be constructed by specifying the question mark
after a value type in a declarator statement. The nullable
int can be specified with the syntax "int?".

Example:
int a=b=10;
int? c= null;
c=a+b

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain metadata in c#.

846


If a class derives from another class, will the derived class automatically contain all the public, protected, and internal members of the base class?

919


What are the types of constructors?

868


What is the difference between paramaterized constructor and copy constructor?

869


Explain when should you call the garbage collector in .net?

872


What is difference between the "throw" and "throw ex" in .net?

896


Which sorting algorithm is best?

943


What is a property in c#?

860


What is a method signature in c#?

890


Name some properties of thread class.

950


How main method is called in c#?

911


What is the use of return in c#?

895


Why hashtable is thread safe in c#?

946


What is decimal in c#?

872


Are value types sealed?

938