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
Do we get an error while executing the “finally” block in c#?
What is serializable in c#?
What is the difference between decimal and integer?
What are the types of class in c#?
What is the difference between console application and windows application?
Why to use lock statement in c#?
What is cosole application?
Which program construct must return a value?
What is type safe in c#?
What is the use of command builder?
What is the difference between method overriding and method overloading?
Define an array?
What is a verbatim string literal and why do we use it?
What is Implicit conversion in C#?
Explain the difference between private and shared assembly?