Possible Duplicate:
Writing a CSV file in .net
Are there any good CSV writers for C#?
Don’t need a reader, just writer.
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.
There’s not much to it, really… here’s some code I’ve used for several years:
You can use the Escape method to ensure that values are properly quoted. I use this class in conjunction with a simple reader, but you said you don’t need that…
Update It’s simple, but there is more to it than
string.Join. However, you can still get away with something pretty simple, if you have an array ofvalues(and are using C# 3+):