Home > Net >  Consult VB.NET how to array parameters in the process of assignment
Consult VB.NET how to array parameters in the process of assignment

Time:10-09


Such as:
1: the program I customize a ofxh process, HTML code is as follows, including a one dimensional array of SC
Public Sub ofxh (ByVal ks As an Integer, ByVal js As an Integer, ByVal sc () As String)
For I=ks To100
Msgbox (I) (sc)
Next
End Sub


Suppose datai () this array has assignment before procedure calls,

'datai () to have the dynamic array assignment,
Private Sub Button4_Click (ByVal sender As System. Object, ByVal e the As System. EventArgs) Handles Button4. Click
??????????????????????????????????
??????????????????????????????????
End Sub

Ask how the datai () () value to the calling process parameter SC realize external datai () ()=SC

CodePudding user response:

Dim exceptVal=datai. Except (sc)


It's as simple as that

CodePudding user response:

Well, if it is difference, I above is right, if you need to assign values to the array, you use the
Dim index=0
For each s in SRC
Datai (index)='s here can be related to operations,
Index +=1
Next
Of course, you also can undertake operation inside the function,

CodePudding user response:

Beginner, don't understand about the process, please feel free to comment
For each s SRC in SRC is what??
Datai (index)='s here can be related to operations,
Index +=1
Next
  • Related