試圖運行在while循環價值要麼過大或過小的字符的EOF聲明的FileStream溢出異常
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 –