Skip to content
twiglet edited this page Sep 14, 2010 · 1 revision

http://www.developer.com/net/csharp/article.php/3527286/Using-Nullable-Types-in-C.htm

In C# 2.0 value types can have a nullable variant (e.g. int? fred = null). Since there are no value types in Java it is ok to translate this to (int fred = null). However, look at this example:


int ValA = 10;
int? ValB = null;

int? ValC = ValA * ValB;

This should assign null to ValC rather than throwing an exception.

Clone this wiki locally