using System;
namespace choex1
{
/// <summary>
/// Class1 的摘要说明。
/// </summary>
class Class1
{
delegate double processdeleGate(double param1 ,double param2) ;
static double MultiPly (double param1 , double param2)
{
return param1 * param2 ;
}
static double Divide (double param1 , double param2)
{
return param1/param2 ;
}
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main(string[] args)
{
processdeleGate proDele ;
Console.WriteLine ("ender 2 number sif e.fs e.") ;
string input = Console.ReadLine () ;
int CommaPos = input.IndexOf (',') ;
double param1 = Convert.ToDouble (input.Substring (0 ,CommaPos) ) ;
double param2 = Convert.ToDouble (input.Substring (CommaPos + 1 , input.Length -CommaPos -1)) ;
Console.WriteLine ("ender in for 2number .") ;
input = Console.ReadLine () ;
if (input == "M")
{
proDele = new processdeleGate (MultiPly) ;
}
else
{
proDele = new processdeleGate (Divide) ;
}
Console.WriteLine ("soult :" , proDele(param1 , param2)) ;
}
}
}
为什么说我出错;