• Nullable types are instances of the System.Nullable struct
• A nullable type can represent the normal range of values for its underlying value type, plus an additional null value
• For example a Nullable
• Same with type bool, which can take true, false and null
• Nullable is used while dealing with databases where element may not be assigned a value
• Syntax is: int? x = null or double? d = 4.108;
• To identify a nullable type: int? x = null; Type t = i.GetType(); Console.WriteLine(t.FullName);
No comments:
Post a Comment