将数组传递给函数时Visual Basic中的System.RankException错误

时间:2015-02-07 12:01:05

标签: arrays vb.net

我遇到了一些严重的困难。他们可以帮助我的任何事情吗?

变量声明(在任何子项之外)

Dim notes = New String() {"A", "A#/Bb", "B", "C", "C#/Db", "D", "D#/Eb", "E", "F", "F#/Gb", "G", "G#/Ab"}

Dim boxString1 = New TextBox()  {boxSt1Pos1, boxSt1Pos2, boxSt1Pos3, boxSt1Pos4, boxSt1Pos5, boxSt1Pos6, boxSt1Pos7,
    boxSt1Pos8, boxSt1Pos9, boxSt1Pos10, boxSt1Pos11, boxSt1Pos12, boxSt1Pos13, boxSt1Pos14,
    boxSt1Pos15, boxSt1Pos16, boxSt1Pos17, boxSt1Pos18, boxSt1Pos19, boxSt1Pos20, boxSt1Pos21,
    boxSt1Pos22, boxSt1Pos23, boxSt1Pos2, boxSt1Pos25}

功能签名(在任何子项之外)

Function populateStrings(startPos As Integer, ByRef gString As TextBox(), ByVal notes As String())

函数调用(Inside form.load sub)

Call populateStrings(3, boxString1(), notes())

程序运行良好但运行时出错,说明上述错误,我无法在函数签名或调用中的任何位置手动定义维度。非常感谢任何帮助。

0 个答案:

没有答案