Asp.net mvc 3 mvc3模型字符串数组属性获取对象引用未设置为对象的实例
在我的申请表中,我有一个 公共类HomeIndexClientModel 我声明这些财产:Asp.net mvc 3 mvc3模型字符串数组属性获取对象引用未设置为对象的实例,asp.net-mvc-3,arrays,Asp.net Mvc 3,Arrays,在我的申请表中,我有一个 公共类HomeIndexClientModel 我声明这些财产: Public strButtonBarProblemGuid() As String Public strButtonBarProblemTitle() As String Public strButtonBarButtonToRender() As String 在我的Sub-New中,我在Linq中有一个循环,其中发生了以下情况: ReDim Preserve Me.strB
Public strButtonBarProblemGuid() As String
Public strButtonBarProblemTitle() As String
Public strButtonBarButtonToRender() As String
在我的Sub-New中,我在Linq中有一个循环,其中发生了以下情况:
ReDim Preserve Me.strButtonBarButtonToRender(intButtonCount) 'set the size of the button bar array
ReDim Preserve Me.strButtonBarProblemTitle(intButtonCount) 'set the size of the button bar array
ReDim Preserve Me.strButtonBarButtonToRender(intButtonCount) 'set the size of the button bar array
如果我跟在后面
Me.strButtonBarProblemGuid(intButtonCount-1)=“AA”'p.SystemUserFileId.ToString
我得到了错误
我尝试过在数组偏移量中使用0索引或1,但都以相同的方式失败
提前感谢。如果没有LINQ语句,很难看到设置这些变量的过程。请把整份声明寄出去 LINQ语句很可能会将空值放入正在执行ReDim的变量中