我想做这个:
Dim Numbers As Integer()() = {{1},{2},{3},{4,5,6,7}}
IDE强调4,7并且说Array初始化器有3个太多的元素.我究竟做错了什么?
以下应该有效:
Dim Numbers As Integer()() = {({1}),({2}),({3}),({4,7})}
You can avoid an error when you supply nested array literals of different dimensions by enclosing the inner array literals in parentheses. The parentheses force the array literal expression to be evaluated,and the resulting values are used with the outer array literal