Default value of nullable types is null

suggest change
public class NullableTypesExample
{
    static int? _testValue;

    public static void Main()
    {
        if(_testValue == null)
            Console.WriteLine("null");
        else
            Console.WriteLine(_testValue.ToString());
    }
}

Output:

null

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents