我将旧的asp.net VB代码转换为新的。
我收到如下错误:
Dim strArray(,) As String (0 To .,0 To .) = New String(11 - 1, (num + 1) - 1) {}
//Error : Array bounds cannot appear in type specifiers
strArray = DirectCast(Utils.CopyArray(DirectCast(strArray, Array), New String((num9 + 1) - 1, (num + 1) - 1) {}), String(0 To .,0 To .)(,))
//Error strArray is not declared.
如何解决这个问题?
答案 0 :(得分:0)
尝试像这样声明数组......
Dim num As Integer = 0 'I just added this as a variable
Dim strArray(,) As String = New String(11 - 1, (num + 1) - 1) {}