can we assign null value to value type in c#?
Answer Posted / aditya
Nullable type is introduced in .NET 2.0. Before 2.0 it was
not possible to assign null to value types.
This was possible with the introduction of Generics in 2.0
and the it would be something like this...
System.Nullable<int> x = new System.Nullable<int>;
or
int? salary = null (new type modifier in 2.0)
| Is This Answer Correct ? | 30 Yes | 7 No |
Post New Answer View All Answers
What is difference between list and ilist in c#?
What is lambda expression in c#?
What is dll file in c#?
Explain “static” keyword in c#?
How to Install uninstall assemblies into GAC?
Can properties be overloaded in c#?
write a program to find the biggest palindrome in the given string
Explain what are the steps for creating clr trigger?
Which of these statements correctly declares a two-dimensional array in c#?
How main method is called in c#?
What is executescalar in c#?
What is the main method?
Does the system.exception class have any cool features?
What is type class in c#?
Which program construct must return a value?