Hi,
How do I split a string into a multidimensional array or a jagged array without looping?
I saw a code snippet where someone was doing so with a file stream and I can't figure out how to make it work for my string.
My string is similar to 1:2;3:1;4:1
and can be split into ID:Qty
.
Here is the code I saw:
string[][] lines = File.ReadAllLines(path)
.Select(line => line.Split(',').ToArray()).ToArray();
Thanks in advance.