can we assign null value to value type in c#?

Answer Posted / shihafath wazeer

correct declaration for a nullable integer is as follows

Nullable<int> i = null;

or

int? j = null;

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a helper method in c#?

475


Why is hashset faster?

489


How does split work in c#?

484


Why dataset is used in c#?

509


What is reflection in c#?

489






How do you prevent a class from being inherited?

527


Does a class need a constructor c#?

486


What is multicast delegate in c# ?

519


What are regular expressions? Search a string using regular expressions?

504


How do you use nullable?

497


What is console writeline in c#?

469


Explain the difference between “as” and “is” operators used in c#?

498


What is the difference between abstract class and interface in c#?

489


What is the difference between a method and a property?

454


What is oledb in c#?

501