提示說cs(19,3)變量e定義了,但從沒有用過

解决方案 »

  1.   

    哦,你这样:
    catch(Exception e)
    {
        Console.WriteLine("You tried division by zero!!"+e);
    }
      

  2.   

    还有一种可能是这样:把e换个名字,因为可能系统自己已经有个异常叫e了
    catch(Exception mye)
    {
        Console.WriteLine("You tried division by zero!!"+mye);
    }
      

  3.   

    Console.WriteLine("The result of the division is:{0}",Result);
    改为
    Console.WriteLine("The result of the division is:{0}",Result.ToString());祝您好运
      

  4.   

    Console.WriteLine("The result of the division is:{0}",Result);
    也可以该为
    Console.WriteLine("The result of the division is:" + Result。ToString());
    测试看看