我的picturebox数组创建Null引用Visual Basic

时间:2015-03-21 18:16:28

标签: .net arrays picturebox

所以我将数据框放入数组中,但是当我运行程序时,我得到NullReferenceExecption未处理的错误。

 Dim ground(5) As PictureBox

 ground(0) = Ground1
 ground(1) = Ground2
 ground(2) = Ground3
 ground(3) = Ground4
 ground(4) = Ground5
 ground(5) = Ground6

然后在计时器中,

 For ss = 0 To 4
        If StopH.Bounds.IntersectsWith(ground(ss).Bounds) Or CrouchH.Bounds.IntersectsWith(ground(ss).Bounds) Or JumpH.Bounds.IntersectsWith(ground(ss).Bounds) Or RunningH.Bounds.IntersectsWith(ground(ss).Bounds) Then

        End If
    Next

0 个答案:

没有答案