Skip to content

Instantly share code, notes, and snippets.

@actaneon
Created August 21, 2009 20:09
Show Gist options
  • Save actaneon/172396 to your computer and use it in GitHub Desktop.
Save actaneon/172396 to your computer and use it in GitHub Desktop.
DelimitedFileParser.cs
using Microsoft.VisualBasic.FileIO;
public class DelmitedFileParser
{
private void Parse()
{
TextFieldParser parser = new TextFieldParser(@"c:\temp\test.csv");
parser.TextFieldType = FieldType.Delimited;
parser.SetDelimiters(",");
while (!parser.EndOfData)
{
string[] fields = parser.ReadFields();
}
parser.Close();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment