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

Cannot convert null to a value type.
So it is not possible to assign null to value type.

Value types include:
All numeric data types
Boolean, Char, and Date
All structures, even if their members are reference types
Enumerations, since their underlying type is always
Byte, Short, Integer, or Long

Reference types include:
String
All arrays, even if their elements are value types
Class types, such as Form
Delegates

Is This Answer Correct ?    20 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between write and writeline?

901


How to generate strong name key file or which command is used to generated strong name key file?

948


What are extensions methods in c#?

879


What are the steps to create a webservice and consume it?

926


can you allow a class to be inherited, but prevent the method from being over-ridden?

971


What is cookies in c# asp net?

948


List the two important objects of ado.net and also list the namespaces that are commonly used in ado.net to aid in connection to a database.

905


Is object an int c#?

927


Can You Prevent Your Class From Being Inherited By Another Class?

944


Is exe is machine dependent?

929


What is nameof c#?

904


What is c# most used for?

980


How to handle exceptions that are raised in a component?

1086


What is use of abstract class in c#?

935


In which order the destructor is called for an inherited class?

987