can we assign null value to value type in c#?
Answer Posted / narayana
Yes We can Assign
A nullable int can store null. Nullable types in the C#
language can be constructed by specifying the question mark
after a value type in a declarator statement. The nullable
int can be specified with the syntax "int?".
Example:
int a=b=10;
int? c= null;
c=a+b
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Explain metadata in c#.
If a class derives from another class, will the derived class automatically contain all the public, protected, and internal members of the base class?
What are the types of constructors?
What is the difference between paramaterized constructor and copy constructor?
Explain when should you call the garbage collector in .net?
What is difference between the "throw" and "throw ex" in .net?
Which sorting algorithm is best?
What is a property in c#?
What is a method signature in c#?
Name some properties of thread class.
How main method is called in c#?
What is the use of return in c#?
Why hashtable is thread safe in c#?
What is decimal in c#?
Are value types sealed?