【发布时间】:2014-07-01 19:46:03
【问题描述】:
我想将二维数组设置为属性,但尝试时不断出现多个错误。
这是我刚刚尝试过的。 cmets 是错误。
Dim _magnitude(,) As Integer
Public Property magnitude() As Integer
Get
Return Me._magnitude 'Value of type '2-dimensional array of Integer' cannot be converted to 'Integer'
End Get
Set(ByVal value As Integer)
Me._magnitude = value 'Value of type 'Integer' cannot be converted to '2-dimensional array of Integer'
End Set
End Property
我相信答案真的很明显,我是 vb.net 的新手。
【问题讨论】:
-
Public Property magnitude As Integer(,)但可能有更好的存储方式 -
谢谢!有什么更好的方法?
-
这取决于它是什么以及它是如何使用、存储、引用的。
标签: arrays vb.net properties