在VB.NET中怎么样给变量数组赋值,例如下
DimlRetAsLongDimidata(10)AsIntegerDimicntAsIntegerdimlRetaslonglRet=comcn.Read("d0",1...
Dim lRet As Long
Dim idata(10) As Integer
Dim icnt As Integer
dim lRet as long
lRet = comcn.Read("d0", 10, (idata(0)))
If lRet = 0 Then
For icnt = 0 To 9
icnt = idata(icnt)
Next icnt
TextBox3.Text = TextBox3.Text & icnt
End If
End Sub
=====================================================
问题点:我也看了些例子,不太明白,icnt = idata(icnt) 提示错误!请指定一下以上代码为例,并且在TextBox3.Text中显示出所有的值!在此谢过! 展开
Dim idata(10) As Integer
Dim icnt As Integer
dim lRet as long
lRet = comcn.Read("d0", 10, (idata(0)))
If lRet = 0 Then
For icnt = 0 To 9
icnt = idata(icnt)
Next icnt
TextBox3.Text = TextBox3.Text & icnt
End If
End Sub
=====================================================
问题点:我也看了些例子,不太明白,icnt = idata(icnt) 提示错误!请指定一下以上代码为例,并且在TextBox3.Text中显示出所有的值!在此谢过! 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询