G
Guest
hey, I have a method that takes a char array of 10.
I have a char array of 30. how do I make it send the first 10, then the
next 10, then the final 10 ?
I need help with my looping skills. thanks.
I have this, but I get the index was out of bounds....
char[] char1 =
{'1','2','3','4','5','6,'7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4', '5','6','7','8','9','0','1'};
char[] char2 = new char[10];
for (int i = 0; i < myChar.Length; i = i + 9)
{
for (int j = 0; j <= 8; j++)
{
char2.SetValue([char1 + char2], j);
method(char2);
}
}
I have a char array of 30. how do I make it send the first 10, then the
next 10, then the final 10 ?
I need help with my looping skills. thanks.
I have this, but I get the index was out of bounds....
char[] char1 =
{'1','2','3','4','5','6,'7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4', '5','6','7','8','9','0','1'};
char[] char2 = new char[10];
for (int i = 0; i < myChar.Length; i = i + 9)
{
for (int j = 0; j <= 8; j++)
{
char2.SetValue([char1 + char2], j);
method(char2);
}
}