[Mono-list] Variable number of Lists depending on a CSV file
Paul F. Johnson
paul at all-the-johnsons.co.uk
Sun Oct 9 12:53:30 EDT 2011
Hi,
> > 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.
Not quite sure how this would work. If my CSV has (say) 20 columns, how
would I be able to read them in from a stream?
Thanks again
PFJ
--
Vertraue mir, ich weiss, was ich mache...
More information about the Mono-list
mailing list