我一直试图用array.clear重置2D数组,但无济于事。我看了几个论坛,建议我使用下面的代码,但它抛出indexOutOfRange异常。
Array.Clear(scoreArray, 0, scoreArray.Length)
for reference this is the array declaration
Dim scoreArray(3, 4) As Integer
答案 0 :(得分:-1)
错误是由其中一个计数器没有与数组一起重置引起的,太懒了,无法确定哪个,所以我只是重置它们
playerCount = 4
textCount = 0
labelCount = 0