I am trying to run this loop
and I keep getting an index out of bounds exception when I know its not. SMS which is a char array has a length of 76. if I manually put in the number it works but if I try and loop it crashes long before it hits the end.Code:int y = 0; char[] tempmess = new char[] { }; for (int a = 56; a < SMS.Length; a++ ) { tempmess[y] = SMS[a]; y++; }
EDIT: its an IndexOutOfRange Exception




Reply With Quote