1
在下面的示例代码中,我试图使用Nullable(of T)作为DateTime,我想使用它与Dimension(Dimension)的Dimensions属性相同。我们可以使用Nullable(of T)属性使用列表<of T>?
Private _duedate As Nullable(Of DateTime)
Public Property DueDate() As Nullable(Of DateTime)
Get
Return _duedate
End Get
Set(ByVal value As Nullable(Of DateTime))
_duedate = value
End Set
End Property
Private _dimensions As List(Of Dimension)
Public Property Dimensions() As List(Of Dimension)
Get
Return _dimensions
End Get
Set(ByVal value As List(Of Dimension))
_dimensions = value
End Set
End Property
如果我们可以请任何帮助,我们该怎么做,将不胜感激。
谢谢。
'List(Of Dimension?)'不是你想要的吗? – Magnus 2012-01-17 18:39:46
只是一个fyi,但大多数时候你不需要List属性的Set选项。 – 2012-01-17 18:46:46