【发布时间】:2015-06-19 11:15:10
【问题描述】:
有人可以解释为什么控制台上输入char 或int 会出现奇怪的输出。请使用窗口控制台并告诉我为什么会有 13-10 等数字和其他数字从这样的位置开始。
namespace TestingVariousLoops
{
class Program
{
static void Main(string[] args)
{
int someValue;
do
{
someValue = (int)Console.Read();
Console.WriteLine(someValue);
}
while (someValue != 6);
}
}
}
【问题讨论】:
标签: c# while-loop do-while