这段代码哪里错了
using System;using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication2
{
class Program
{
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;
}
static void Main(string[] args)
{
ProcessDelegate process;
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));
input = Console.ReadLine();
if (input == "M")
process = new ProcessDelegate(Multiply);
else ;
Console.WriteLine(process(param1,param2));
}
}
}
这段代码哪里错了 编译器错误显示"使用了未赋值的局部变量process"
就这唯一一个错误