I use the powerful FileHelpers Library. But is there a built-in way to search over the generated objets.
var engine = new FileHelperEngine<Text>();
var res = engine.ReadFile("myfile.csv");
string result = res["key"].value;
My csv is like : key;value
I mean, is it possible not to access objects with the array [0], [1], [12]…
maybe like in the code example.
Thanks a lot !
You can convert your resulting array to a dictionary via LINQ with:
The following complete program demonstrates the approach.