Hello all
I have a project that I have to read the file - which I have done I
can see the file output. I then need to read the line - parse the
line into three separate values (there are 3 = name age and gender)
static void DoPartD()
{
FileInfo theSourceFile = new FileInfo(@"c:\\Documents and
Settings\\Rob\\School\\CIS 252\\Ass2\\people.DAT");
StreamReader reader = theSourceFile.OpenText();
StreamWriter writer = new StreamWriter(@"c:\\Documents and
Settings\\Rob\\School\\CIS 252\\Ass2\\people.BAK",false);
string text;
do
{
text = reader.ReadLine();
writer.WriteLine(text);
Console.WriteLine(text);
} while (text != null);
reader.Close();
writer.Close();
}
I am not sure how to read just one line at a time to parse them
like I said, I can see all the lines when
Console.writeline(text)......
It is delimited with a semi colon
Thanks
Rob
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---