Iam trying to write code that read integer numbers from user (intered in form) and put it in array and then i will do some calcuation.
I declare The array z and index of array p at begining of the class (global), I dont specify the size of arry couz that it depend on user.
If CInt(l1.Text) >= 0 Then z(p) = CInt(l1.Text.ToUpper) l1.Clear() l1.Focus() p = p + 1 Else MsgBox("not a Number", MsgBoxStyle.Critical, "Error") End If
when I run the code there is an error in
"Object reference not set to an instance of an object."
I try to solve this problem but
please help me