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
What are the value types in c#?
Is arraylist generic in c#?
Is c++ or c# better?
Explain the difference between a sub and a function in c#.
Can you see a loop recorder?
Hi Friends, I am going through Siemens Interview Procedure from last 1+1/2 months. I went through 1 written + 2 Technical + 1 Managerial Round process after which I got call from HR informing that "you are selected and we would like to meet you for HR round". HR round was very nominal compared to MR. HR Round last for hardly 5 mins. They told me that you will get the final result on Friday. Still I have not received any feedback from them. Please help!!!
How do I unload an application domain?
Can destructors have access modifiers?
Explain About friend and Protected friend
Why are mutable structs evil?
What is an example of a delegate?
What is the difference between class and namespace?
Why do we use overloading in c#?
What is the use of regex in c#?
What does the initial catalog parameter define in the connection string?