Is there a way in Linq to take each element in my string[] and assign each element to a square Multi-Dimensional(2D) array by its row. Meaning, 2D[0,i], where i increments by 1 assigning 1D[i] there. Note, 1D array is guaranteed to be same length as width of 2D array. Also, my 2D array accessor is limited to only a class indexer, so my class indexer looks like this, CLASS[r,c].
Here is how I'm creating my 1D array: lineRead.Split(" ", StringSplitOptions.RemoveEmptyEntries);
In sudo code, this is what I want to achieve.
lineRead.Split(" ", StringSplitOptions.RemoveEmptyEntries).Select(e => CLASS[r,c] = e);
I'm terrible with Linq and I feel like there should be a way to do this, obviously I don't know what I'm doing with Linq here... Lol Any ideas, any help? Thanks
rin yourCLASSindexer? Is it always0?