So here's the solution I found:
String input = "1=2;3=4;5=6"; String myArray1[] = input.Split(';'); String myArray2[][] = input.Split(';').Select(s => s.Split('=')).ToArray();
myArray1 will give {1=2, 3=4, 5=6} which is a 1-dimension array while myArray2 will give {1,2},{3,4},{5,6} which is a 2-dimension array.
No comments:
Post a Comment