In the following code, I read each line of a file and parse the columns to an object. each object has three elements info1,info2 and info 3. I add all the objects to a list and then convert the list to array. my final result now is an array of items with
each item having columns from text file. I want to now make individual arrays for each column making three arrays from that one array like info1array, info2array and info3array. how to convert that. I dont want to use any for ,while loops as my text file is
really big and the info class has many memebers rather than what is shown in this code sample. Please let me know how can i break this one array to multiple arrays with one column each.
public class info { public string info1 {get;set;} public int info2 {get;set;} public string info3 {get;set;} } static void main() { list<info> p1 = new list<info>(); streamreader rd = new streamreader("c:\text.txt") while(!rd.EndOfStream) { string line = rd.readeline(); info inf = new info() { info1 = line.substring(0,2),info2 = line.substring(2,5), info3 = line.substring(8,9) }; p1.add(inf); } info[] arrayinfo = p1.Toarray(); }