Is there any difference between type? and Nullable?

前端 未结 9 1185
礼貌的吻别
礼貌的吻别 2020-12-15 15:53

In C# are the nullable primitive types (i.e. bool?) just aliases for their corresponding Nullable type or is there a difference between th

9条回答
  •  天涯浪人
    2020-12-15 16:27

    No difference. Take a look here: http://msdn.microsoft.com/en-us/library/1t3y8s4s.aspx

    "The syntax T? is shorthand for Nullable, where T is a value type. The two forms are interchangeable."

提交回复
热议问题