"Nullable Value Types"

class MyClass {
	public int MyInt { get; }
	public int? MyNullableInt { get; } // This property can be null even though it's of type 'int'
	
	public MyClass(int? input) { // input can be null
		MyInt = input != null ? input.Value : 0; // .Value throws an exception when accessed if input is null
		MyNullableInt = input;
	}
}

// ..

static void Test() {
	var mc = new MyClass(null);
	if (mc.MyNullableInt == null) Console.WriteLine("Was null!");
}


Code snippet taken from "Two Decades of C#: A Reference - C# 2, 3 and 4".