那是应为Read()的返回只是int的, 字符'8'的编码是56, 所以输出56了
用ReadLine()就可以了:)

解决方案 »

  1.   

    msdn的例子:
    [C#] 
    // From textReaderText, create a continuous paragraph 
    // with two spaces between each sentence.
    string aLine, aParagraph = null;
    StringReader strReader = new StringReader(textReaderText);
    while(true)
    {
        aLine = strReader.ReadLine();
        if(aLine != null)
        {
            aParagraph = aParagraph + aLine + " ";
        }
        else
        {
            aParagraph = aParagraph + "\n";
            break;
        }
    }
    Console.WriteLine("Modified text:\n\n{0}", aParagraph);
      

  2.   

    应该这样
    int a=Convert.ToInt32(Console.ReadLine());
    因为string不能隐式转为int;
    :)
      

  3.   

    如果你费要转化成 int 
    int i  = int.Parse(Console.ReadLine());
      

  4.   

    int a;
    Console.Write("input a number:");
    a=Convert.ToInt32(Console.ReadLine());
    Console.WriteLine("the number is:{0}",a);