StreamReader, C#, peek
问题 I have a StreamReader that once in a while check if it has more to read from a simple text file. It uses peek property. The problem is that when I am using peek the position is changed, althougth not suppose to. FileStream m_fsReader = new FileStream( m_strDataFileName, FileMode.OpenOrCreate, FileAccess.Read, FileShare.ReadWrite ); StreamReader m_SR = new StreamReader(m_fsReader); Console.WriteLine("IfCanRead SR Position " + m_fsReader.Position + " and Length " + m_fsReader.Length); if (m_SR