I have a string array of the form [a b, a b, a b,...] and I want to create a new array of just the b values. I have tried a .split(" ") but it keeps coming up with an index outside the bounds of the array error.
for (int sequence = 0; sequence < FileIndex.Length; sequence++)
{
string[] SplitIndex = FileIndex[sequence].Split(' ');
sequence++;
WriteLine(SplitIndex[sequence]);
}
sequence++inside The for loop is not needed. That will increase the value ofsequencetwice on each iteration