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


Please Help Members By Posting Answers For Below Questions

Explain About Iunknown interface Queue

541


What is the main purpose of delegates in c#?

507


What is Delegate and what is it used for ?

575


What is jagged array?

540


Can we overload indexer in c#?

478






What is an icollection in c#?

487


Which .gang of four. Design pattern is shown below?

490


Expalin the way you implement inheritance by using VB.NET/C#?

527


What is boolean conditions in c#?

499


Can constructor have return type c#?

634


What does console readline do?

467


Is 0 an unsigned integer?

494


Why do we need properties in c#?

491


What is the use of console?

486


How to install or uninstall a windows service?

566