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
How to implement a singleton design pattern in c#?
What is platform independence"?
What is datagridview in c#?
What is the lock statement in c#?
Where do we use static class in c#?
Is datetime nullable c#?
Write a program to find the angle between the hours and minutes in a clock
What are the different types of literals in c#?
What is thread pooling?
What is the use of 'as' Keyword in C# ?
What is exe file in c#?
What is the difference between ienumerable and iqueryable?
What is multidimensional array in c#?
How to do and Apply Themes to Datagrid,Lable,Textbox,etc., in C#.NET 2005 Windows Application? (like who we will do themes in ASP.NET using .CSS and .SKIN files). Urgent!!
Is lazy thread safe c#?