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

Can you use foreach iteration on arrays in c#?

1076


What are the advantages of using delegates in c#?

930


What is the size of a decimal?

1082


What are indexers in c# .net?

970


What are the new features in c# 2.0?

983


Is it true that all c# types derive from a common base class?

1096


What is data annotation in c#?

939


Explain how obfuscator works in .net

1004


Why do we use public static void main in c#?

956


Can you declare a class or a struct as constant?

1074


What is array and its types in c#?

935


Why are strings immutable in c#?

902


If you define a user defined data type by using the struct keyword, is it a value type or reference type?

888


What is a deadlock lock?

931


Why do we still see so much non-oo code written in c# today?

946