can we assign null value to value type in c#?
Answer Posted / yogesh
Cannot convert null to a value type.
So it is not possible to assign null to value type.
Value types include:
All numeric data types
Boolean, Char, and Date
All structures, even if their members are reference types
Enumerations, since their underlying type is always
Byte, Short, Integer, or Long
Reference types include:
String
All arrays, even if their elements are value types
Class types, such as Form
Delegates
| Is This Answer Correct ? | 20 Yes | 10 No |
Post New Answer View All Answers
What happens during the process of boxing?
Is arraylist faster than linkedlist?
What does the keyword “virtual†declare for a method or property?
What are satellite assemblies?
What is the difference between static class and singleton class in c#?
What are virtual destructors?
What is mvc firstordefault?
Tell us something about static linking and dynamic linking?
what are some characteristics of an array?
How to implement delegates in c#.net
How do I count the length of a string in c#?
What are circular references?
How will you allow a class to be inherited, but prevent the method from being over-ridden?
Explain the difference between “as” and “is” operators used in c#?
Explain the difference between abstract class and interface in .net?