Click here to Skip to main content
15,897,334 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How do I assign variables to a 2 dimensional array in VB.net?

What I have tried:

Dim arr(10,10) as Integer

Dim i=5
Dim j=6

arr(0,0)=?
Posted
Updated 14-Sep-16 5:38am
Comments
[no name] 14-Sep-16 8:17am    
You have to replace the ? with something.

You're going the wrong way:
VB.NET
Dim arr(10,10) as Integer

Dim i=5
Dim j=6
arr(i,j) = 666
 
Share this answer
 
You already got the answer.
I recommend to follow some tutorials and learn the debugger, it will be a graet help for your learning.

You should learn to use the debugger as soon as possible. Rather than guessing what your code is doing, It is time to see your code executing and ensuring that it does what you expect.

The debugger allow you to follow the execution line by line, inspect variables and you will see that there is a point where it stop doing what you expect.
Debugger - Wikipedia, the free encyclopedia[^]
Mastering Debugging in Visual Studio 2010 - A Beginner's Guide[^]

The debugger is here to show you what your code is doing and your task is to compare with what it should do.
When the code don't do what is expected, you are close to a bug.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900