我需要返回两个变量类型的三个值,所以我决定使用ref和out参数,但是我在实现它们时遇到了麻烦。我不断收到这些“方法'GETValues'没有重载需要0个参数”错误。我究竟做错了什么?
public static double GETValues(out string empName, out double dblSal, out double dblMonthSales)
{
string salaryStr,
monthlySales;
Console.Write("Enter employee's name (enter nothing to quit) : ");
empName = Console.ReadLine();
Console.Write("Enter Annual Salary (0 for pure commission): ");
salaryStr = Console.ReadLine();
dblMonthSales = Double.Parse(salaryStr);
Console.Write("Enter monthly sales: ");
monthlySales = Console.ReadLine();
dblSal = Double.Parse(monthlySales);
return dblMonthSales;
return dblSal;