3
Answers

Parse a csv file using linq

Photo of Lawrence Pond

Lawrence Pond

11y
1.7k
1
I have a csv file that looks like this
 
 Names.csv
"Name1", "Name2", "Name8", "Name4", "Name5", "Name6" , "Name7", "Name3" , "Name9"
 
In C# I would like to user Linq to do the following
open file read the names, parse them out  and strip off the double quotes then order them by name and write them to Name.out file.
 
output 
1- Name1
2- Name2
3- Name3
4- Name4
5- Name5
6- Name6
7- Name7
8- Name8
9- Name9

Answers (3)

Next Recommended Forum