在使用C#的MVC3中,可以为空的Model的属性定义为
public int? MyProperty { get; set; }
但是,我怎样才能用vb.Net语言翻译它?
答案 0 :(得分:2)
Public Property MyProperty As Integer?
答案 1 :(得分:1)
public property MyProperty As Nullable(Of Integer)
答案 2 :(得分:0)
要对此进行扩展,有 3 种可接受的方式:
Dim ridesBusToWork1? As Boolean
Dim ridesBusToWork2 As Boolean?
Dim ridesBusToWork3 As Nullable(Of Boolean)