Nugs
asked on
Last item in the array
I am trying to get the last item in an array every time... The array may be any size but i know that the last item in the array is always the value i need... I am trying to do this and the code is failing:
int arySize = aryItem.Length;
in MyVariable = Convert.ToInt32(aryItem[ar ySize]);
How can i get the last array item every time?
Nugs
int arySize = aryItem.Length;
in MyVariable = Convert.ToInt32(aryItem[ar
How can i get the last array item every time?
Nugs
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Did you test the upperbound method of the array ?
ASKER
realevergod: that worked, thanks..
PHD: I tried out LowerBound... Maybe i used it wrong but did not get the results i needed
Nugs
PHD: I tried out LowerBound... Maybe i used it wrong but did not get the results i needed
Nugs
upperbound