【发布时间】:2011-09-23 04:23:05
【问题描述】:
所以 TextReader.ReadLine() 返回一个字符串,但 TextReader.Read() 返回一个 int 值。这个 int 值似乎也是某种我不认识的格式。是否可以将此整数转换为字符?感谢您的帮助。
编辑:
TextReader 值 = new StreamReader(@"txt");
string SValue1;
int Value1;
Value1 = Values.Read();
Console.WriteLine(Value1);
Console.ReadKey();
当它读出值时,它会给我 51 作为输出。 txt文件的第一个字符是3,为什么会这样呢?
【问题讨论】:
-
Int to Char in C#的可能重复
标签: c# input char int32 textreader