StreamReader.cs - IndexOutOfRangeException
description
Hi,
we wrote a test program which can read out a file, this test program is in the attachment.
This program reads out a file with readline(), but on one line there comes a IndexOutOfRangeException.
This Exception was thrown from Peek() what is in the readline function.
When I separate readline and Peek(). The Peek() function hangs up on one line.
There are two int variables in the Peek() function m_curBufPos and m_curBufLen.
The problem comes, because this two variables have not the right value.
When I comment out line 88 till line 111 in the „C:\MicroFrameworkPK_v4_1\Framework\Core\System\IO\StreamReader.cs“ file.
I have no problems with my test program. But I think thats not the right way.
Do you know for what the two variables m_curBufPos and m_curBufLen?
And why could they have false values?
Thanks,
Bernhard