K
Krish
I think I have understood Arrays incorrectly in C#.
I declared the following
int[] myIntArray = new int[5] { 1,2,3,4,5 };
I assumed that this has created an Integer Array, and to access any element
I would have to do the following : myIntArray[4];
However I see that there is also another way of doing this I am not sure
why people would use this call.
int myRes = (int) (myIntArray.GetValue(1));
I think I have to do this only if my Array is an array of Objects.
Please clarify.
I declared the following
int[] myIntArray = new int[5] { 1,2,3,4,5 };
I assumed that this has created an Integer Array, and to access any element
I would have to do the following : myIntArray[4];
However I see that there is also another way of doing this I am not sure
why people would use this call.
int myRes = (int) (myIntArray.GetValue(1));
I think I have to do this only if my Array is an array of Objects.
Please clarify.