-4

What is the index of the first cell (the first left cell in first line and first row) in jagged array in C#?

a[0][0]?? 
a[0][1]??
2
  • 1
    A simple breakpoint followed by hovering over the array (once the breakpoint hit) with your mouse would tell you that. Commented May 4, 2014 at 18:18
  • the index starts from zero
    – zahrakhani
    Commented Nov 25, 2020 at 15:20

1 Answer 1

2

If your array is defined as int[][], then the first line would be a[0], and the first cell a[0][0]. I should suggest that you try to find out such simple things by experiment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.