You can make any value type nullable, allowing it to either be null or to contain one of its normal values.
Since user-defined structs are value types, you can also make any struct nullable, using Nullable<T> or T? notation.
1 2 3 4 5 6 7 8 9 10 11 | // Regular structGuyInfo gi1 = new GuyInfo("Isaac", 1642);// Nullable, with no valueNullable<GuyInfo> gi2 = null;// Nullable, 2nd form, with valueGuyInfo? gi3 = new GuyInfo("Albert", 1879);bool hasVal1 = gi2.HasValue;bool hasVal2 = gi3.HasValue; |

