ralphtrent
Programmer
Hello
I have a line break in the middle of a line. Notepad shows it as one line however. It is not a Carriage Return, just a line feed. When I attempt to read the line using StreamReader.ReadLine(), it reads up to the LF, then stops, when I ReadLine again, it is the continuation. I have tried replace \n and \r to not avail. I think that is because StreamReader already sees the new line before I replace it.
here is my code
I have a line break in the middle of a line. Notepad shows it as one line however. It is not a Carriage Return, just a line feed. When I attempt to read the line using StreamReader.ReadLine(), it reads up to the LF, then stops, when I ReadLine again, it is the continuation. I have tried replace \n and \r to not avail. I think that is because StreamReader already sees the new line before I replace it.
here is my code
Code:
while (!lsrReadInput1.EndOfStream)
{
string lstrCurrentLine = lsrReadInput1.ReadLine().Replace('\n', ' ');
[green] attempt to do stuff with lstrCurrentLine[/green]
}
[code]
Any help is appreciated.