0 votes
by (2.5k points)
Is there an actual difference between int? and Nullable<int>? And is there a time when I should use one or the other?

1 Answer

0 votes
by (2.5k points)

In terms of the type system, there is no difference. For example this code will output true : 

int? myInteger = 123;
Console.WriteLine(myInteger is Nullable<int>);

Infact, depending on your version of C#, it will actually suggest that you can simplify the call to Nullable<int> to just be int? 

Welcome to .NET Q&A, where you can ask questions and receive answers from other members of the community.
...