reference type
ex:string str=”null”;
Interviews4 answers
What is Nullable Types in C#?
4 Answers
Hari AmaraPosted Dec 30, 2019, 6:27 AM EST
Value types can not store the null values,nullable feature added in c#2.0.now onwords we can able to add null values to value types.
ex: int x=null; \\invalid
int? x = null; \\ valid
Samatha ReddyPosted Mar 16, 2017, 4:09 AM EDT
mostly value types cannot be assigned as null.(Eg:int a =null)
To break this c# implemented null-able types so that we can assign value types as null.(Eg : int? a) this specifies a might be null
Ayappan AlagesanPosted Feb 11, 2017, 8:15 PM EST
Variable types does not hold null values so to hold the null values we have to use nullable types. So nullable types can have values either null or other values as well.
Eg: Int? a= null;
Vivek KumarPosted Feb 8, 2016, 8:20 AM EST


