Hi - I have a problem where I have a list of strings, and i need to split up the components of each string in the list and create a new array with the reordered data in the right format.
For example: I have
(line 1) PDIA20031.MV PDIA45141.MV TIA20102.MV TICA20033.MV TICA20033.OP
(line 2) 01.62 00.83 100.76 30.58 --.--
(line 3) 01.62 00.83 100.77 30.58 --.--
(line 4) 01.60 00.83 100.78 30.57 --.--
(line 5) --.-- 00.83 100.79 30.57 --.--
(line 6) --.-- 00.82 100.80 30.57 --.--
(line 7) 01.63 00.83 100.81 30.58 --.--
etc.
I need to split the string up into an array with:
Data(x,y)
Data(0,0) = PDIA20031.MV
Data(0,1) = 01.62
Data(0,2) = 01.62
etc
Data(1,0) = PDIA45141.MV
Data(1,1) = 00.83
Data(1,2) = 00.83
etc
Data(2,0) = PDIA45141.MV
Data(2,1) = 100.76
Data(2,2) = 100.77
etc
I have been trying to think how to get round this, and have started using the split function for each line. However, I am confused as how to get the split looping through the list for each line (string) and getting it to write each component of the string into the required place in the array.
Thanks for your help so far, this forum is great for (slowly) getting me up to speed with C#. Any help would be greatly appreciated. :)
Si01