Created
August 21, 2009 20:09
-
-
Save actaneon/172396 to your computer and use it in GitHub Desktop.
DelimitedFileParser.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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