Which is the most performant way to read a large csv file in .NET?
Using FileStream? or another class?
Thanks!
Which is the most performant way to read a large csv file in .NET?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to read it all into memory, a simple
File.ReadAllText()will do just fine.EDIT: If your file is indeed very large, then you can use the
StreamReaderclass, see here for details. This approach is sometimes inevitable but should mostly be avoided for style reasons. See here for a more in-depth discussion.