[VB.NET]VB REDIM

前端之家收集整理的这篇文章主要介绍了[VB.NET]VB REDIM前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
VB REDIM 有段儿VB的代码,在参数设定初始值时,不知道它在做什么: ReDim P_Value(0 To UBound(P_Name),0 To Lotnum - 1) As Variant P_Value(0,0) = OrderNo P_Value(1,0) = WorkNo P_Value(2,0) = Dtl_No(0) For j = 0 To Lotnum - 1 P_Value(3,j) = LotNo(j) Next j P_Value(4,0) = Lotnum ReDim P_Obj(0 To UBound(P_Name)) As Object ReDim P_Flg(0 To UBound(P_Name)) As Boolean For i = 0 To UBound(P_Name) P_Flg(i) = False If IsDBNull(P_Array(i)) Then If Not CMNOracleParameters_Add(CStr(P_Name(i)),P_Value(i,0),CInt(P_IO(i)),CInt(P_Type(i)),P_Obj(i)) Then ErrCode = RTN_ORA GoTo FUNC_ERR End If Else ReDim P_WorkArray(0 To P_Array(i) - 1) For j = 0 To P_Array(i) - 1 P_WorkArray(j) = P_Value(i,j) Next j If Not CMNOracleParameters_AddTable(CStr(P_Name(i)),CInt(P_Array(i)),CInt(P_Element(i)),P_WorkArray(),P_Obj(i)) Then ErrCode = RTN_ORA GoTo FUNC_ERR End If End If P_Flg(i) = True Next i 这段儿代码转到VB.NET应该怎样做,ReDim P_Value(0 To UBound(P_Name),0 To Lotnum - 1)改怎么转,下面怎么使用 __________________________________________________________________________ array.resize ding __________________________________________________________________________ lz 去代码转换网站试试吧 应该是可以的 __________________________________________________________________________ ReDim P_Value(0 To UBound(P_Name),0 To Lotnum - 1) 在.Net中也是这个用法呀,不需要转换的吧。 __________________________________________________________________________ ReDim P_Value(0 To UBound(P_Name),0 To Lotnum - 1) 会报错 __________________________________________________________________________ 什么错误? Dim P_Value() as object ReDim P_Value(0 To 10,0 To 10) __________________________________________________________________________ Dim P_Value() as object ReDim P_Value(0 To 10,0 To 10) 会报 ReDim 配列维数不可以改变 __________________________________________________________________________ 昨儿一疏忽漏写逗号了。呵呵 Dim P_Value(,) As Object ReDim P_Value(0 To 10,0 To 10) __________________________________________________________________________ 原文链接:https://www.f2er.com/vb/263725.html

猜你在找的VB相关文章