To All,
I decided to add some comment lines to a CSV file, just in case someone opens the file manually. Once I added the comment lines I started getting XML processing errors, because of the new format. I have spent hours trying to fix this problem using StartsWith,
but I am still having errors.
Here is the problem that I am trying to fix:
1. Process CSV file
2. The CSV file has four lines that start with #
3. Loop through the CSV file until a line without a # occurs
4. Start processing the rest of the file
Question:
Code:
while (serverLogRead.ReadLine().StartsWith("#") == true)
{
Application.DoEvents();
}
// This starts reading the entire file again. How do I start reading
// the after the last #?
string contents = serverLogRead.ReadLine();
Process the rest of the file until the end is reached.
while (contents != null)
{
// do the xml work here
}
Thanks for any help in fixing this issue.
Intel96
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.