编写了一个方法:
   void calc(object sender,EventArgs e)
      {
          double answer;
          Button pressedbutton=(Button)sender;
          switch(pressedbutton)
             {
                case"Button1":
                                                          answer=Convert.ToDouble(TextBox1.Text)+Convert.ToDouble(TextBox2.Text);
                      break;
             }
       }
在页面的source中的按钮控件中调用此方法,运行后出错提示:Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0151: A value of an integral type expectedSource Error: Line 19:         double answer;
Line 20:         Button pressedbutton = (Button)sender;
Line 21:         switch (pressedbutton)
Line 22:         {
Line 23: