如何获取以下程序来打印sumOfNumbers方法的结果?我无法在main方法中调用此方法,我不知道为什么.谁能解释我做错了什么?
class Program
{
static void Main(string[] args)
{
//Console.WriteLine();
//Console.ReadLine();
}
private int sumOfNumbers (int x, int y)
{
return x + y;
}
}
Run Code Online (Sandbox Code Playgroud) c# ×1