Length of Array

K

Krish

I did length of an array - as Array.Length, the value is not the same as
the value shown in the debugger. I know that the array has 503 rows

Should I use the length statement.

The array in the debugger shows up as [0,0] [0,1], [1,0],[1,1]

How do I get to the values.

thanks for any help.
 
B

Bjorn Abelli

...
I did length of an array - as Array.Length,
the value is not the same as
the value shown in the debugger.
I know that the array has 503 rows

Are you sure?
Should I use the length statement.

That depends on what you want to know about the array.

The Length *property* tells you how many elements the array can contain,
regardless of how many dimensions it has...
The array in the debugger shows up as [0,0] [0,1], [1,0],[1,1]

Which means it has two dimensions.
How do I get to the values.

From which element in the array?

Example:

object o = myarray[2,3];

....gets you the fourth element in the third row of the array.


// Bjorn A
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top