My program reads a file which has thousands of lines of something like this below
“Timestamp”,”LiveStandby”,”Total1″,”Total2″,”Total3″, etc..
each line is different
What is the best way to split by , and delete the “” as well as put the values in a list
this is what I have
while ((line = file.ReadLine()) != null)
{
List<string> title_list = new List<string>(line.Split(','));
}
the step above still missing the deletion of the quotes. I can do foreach but that kinda defeat the purpose of having List and Split in just 1 line. What is the best and smart way to do it?
Keeping it simple like this should work: