|
发表于 2020-2-15 03:00:02
|
显示全部楼层
private void Form1_Load(object sender, EventArgs e)
{
//StreamReader sr = new StreamReader(@"c:\123.txt");
FileInfo fi = new FileInfo(@"c:\123.txt");
FileStream fs = File.Open(@"c:\123.txt", FileMode.Open);
byte[] fileContent = new byte[(int)fi.Length];
fs.Read(fileContent, 0, (int)fi.Length);
foreach (byte indiv in fileContent)
{
System.Diagnostics.Debug.WriteLine("'" + indiv.ToString() + "': Code :" + Convert.ToChar(indiv).ToString());
}
string a = ""; //此处下断点,看IDE输出窗口内容
} |
|