provoque une exception de débordement lorsque vous essayez d'exécuter une instruction eof dans la boucle while La valeur était trop grand ou trop petit pour un caractèreFileStream débordement Exception
string filePath = @"C:\Users\Klanix\Desktop\NewC#\testfile2.txt";
FileStream fs = File.Open(filePath, FileMode.Open);
char readChar;
byte[] b = new byte[1024];
while(fs.Read(b, 0, b.Length) > 0)
{
readChar = Convert.ToChar(fs.ReadByte());
Console.WriteLine(readChar);
}
https://stackoverflow.com/questions/11985348/read-and-output-a-text-file-using-streamreader-char-by-char –