When should one use nullable types in c#?
问题 I have been repeatedly asked the following questions in many interviews.... But still can't explain them with a simple example... What are nullable types in c#? When should one use nullable types in c#? Can you give a simple example? Any suggestions? 回答1: From Using Nullable Types (C# Programming Guide) (Link updated circa 2018) For an example of when you might use a nullable type, consider how an ordinary Boolean variable can have two values: true and false. There is no value that signifies