Hi, See inline comments below..
On Sun, Oct 9, 2011 at 9:21 AM, Paul F. Johnson <[email protected]> wrote: > Hi, > > Is there a simple way to do this? > > What I'd like to do is read in a CSV file with each column being stored > in it's own list. This is simple enough if I restrict the file to have a > static number of column - I could have something like > > List <double> col1 = new List<double>(); > List <double> col2 = new List<double>(); > > and so on. > > However, what I'd like to do is have a dynamic number of List objects > depending on the number of columns. This is the first thing that comes to mind, assuming every column in the CSV file will be a double value. However, I am not 100% sure if this is the most efficient approach. List<List<double>> rows = new List<List<double>>(); Here, you have a list within the list where the outer list would represent each row in the CSV while the inner list would contain the value of each column in the row of the CSV. Hope this helps... Thanks, Ryan > > Is this possible? > > TIA > > Paul > -- > Vertraue mir, ich weiss, was ich mache... > > _______________________________________________ > Mono-list maillist - [email protected] > http://lists.ximian.com/mailman/listinfo/mono-list > _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
