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
Can a method return multiple values in c#?
What's the difference between a method and a procedure?
What is the interface in c#?
Why abstraction is used in c#?
What is system predicate?
What is .dbml file?
Define a partial class?
What do you mean by saying a "struct is a value type"?
what is the difference between interface and multiple interface?
Explain the difference between user control and custom control. Also, explain their use.
What does static mean in c sharp?
What is the difference between static class and singleton class in c#?
In a site to turn off cookies for one page which method is followed?
Describe the difference between inline and code behind - which is best?
What is assembly manifest?