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


Please Help Members By Posting Answers For Below Questions

What is the difference between dll and lib?

480


What is different between Implicit conversion and Explicit conversion in C#?

520


What is the real use of interface in c#?

466


Is concurrent queue thread safe?

481


What is event delegate in c#?

582






What is inner class in c#?

522


Is c# and c sharp same?

489


What is null in database?

466


What is the major difference between a custom control and user control?

561


What is a class level variable in c#?

498


What does type safe mean in c#?

511


What is a singleton unity?

557


What’s a strong name?

526


What is callback in c#?

479


What is xpath in c#?

485