I am trying to get the information from this file (indexes.csv):
Into an instance of this class:
class Table
{
Dictionary<String, double> _regionTimeValues;
String _region;
public Table(String region)
{
_regionTimeValues = new Dictionary<string, double>();
_region = region;
suckInValues();
}
private void suckInValues()
{
//Go find File, get the appropriate Values for _region
//add each value found in the csv file that applies, indexed by yearQuarter
//Example: _regionTimeValues.Add("2013Q1", 1.1 );
}
internal double locateRelevantValue(string yearQuarter)
{
double locatedValue = 0.0;
_regionTimeValues.TryGetValue(yearQuarter,out locatedValue);
return locatedValue;
}
I want to only fill the dictionary with the specific region's data.
How can I do this from a csv file?
EDIT
An example of region would be a string value like "Dalton"