You might be interested in the
TextFieldParser[
^]
using (TextFieldParser parser = new TextFieldParser(filename))
{
parser.CommentTokens = new string[] { "#" };
parser.SetDelimiters(new string[] { ";" });
parser.HasFieldsEnclosedInQuotes = true;
parser.ReadLine();
while (!parser.EndOfData)
{
string[] fields = parser.ReadFields();
....
}
}
This way you can handle the conversion of each field yourself.
Best regards
Espen Harlinn