I'm reading values in from a text file, instantiating a new instance of a class given the values that I'm reading in then trying to organize them in a series of lists. These lists are then stored in a sorted dictionary with a double as a key to return the list.
For example, I have a list declared as:
List<DataPoint> Seventy = new List<DataPoint>();
I then may then read in a line 70.0, 43.2, 23.1, 235, 63, 43. My goal is to create an object - DataPoint - from the values that I'm reading in (which I know how to do) and then store that DataPoint in the "Seventy" List.
I think I have to use reflection, I'm just unsure of how to retrieve the list dynamically at runtime and continually append the DataPoint objects to the same list.
Thanks in advance!!
Aucun commentaire:
Enregistrer un commentaire