C# Programming - Datatypes - Discussion
Discussion Forum : Datatypes - General Questions (Q.No. 11)
11.
Which of the following statements are correct?
- We can assign values of any type to variables of type object.
- When a variable of a value type is converted to object, it is said to be unboxed.
- When a variable of type object is converted to a value type, it is said to be boxed.
- Boolean variable cannot have a value of null.
- When a value type is boxed, an entirely new object must be allocated and constructed.
Discussion:
13 comments Page 2 of 2.
Rahul said:
1 decade ago
Boolean variable cannot have a value of null - is a correct one.
Omkar said:
7 years ago
Boolean is value type in C# hence must not be null.
Pankaj jindal said:
8 years ago
According to me, option 4 is also correct.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers