Hi PyrexKidd,
Thanks for correcting that. I meant to say I DON'T use "m_ " to prefix class fields unless I have really have to (e.g. I'm working in a class that already uses that convention, my boss/team leader says I should do it that way, etc)
Arrays...
If you define a fixed size array you can only index the elements within the array boundaries and they have zero-based indexes:
If you don't want to use the zeroth element (e.g. sizes[0]) that's up to you though that would be an odd thing to do. For example if you need 10 elements in your array following your logic you would define it like this:Code:int[] sizes = new int[2];
sizes[0] = 45; // Indexing the first (sometimes called the zeroth element).
sizes[1] = 47; // Indexing the second element.
sizes[2] = 49; // This should produce an exception because we are trying to index into an element that is not there, i.e. it is beyond the array boundaries.
To answer your question more directly if you define an array such as sizes[2] you cannot access elements 2 - 10. You can access 0 and 1 as the array only has two elements.Code:int[] sizes = new int[11];
// You can ignore the zeroth element if you will but that is not the C# way in general.
// This becomes important if someone uses that array in some other code without knowing // // your convention.
sizes[1] = 1;
...
sizes[10] = 10;
Hope this makes things clearer. It would be beneficial to you if you could borrow a book from the library or check out some of the general C# concepts in MSDN. Folks here at codeguru will be glad to help whenever they can on specific things.

