I can't access my delegate in the main method. I think it has something to do with the static main. But I can't make my delegate static.
public delegate double Calculation(double number1, double number2);
static void Main(string[] args)
{
}
The delegate type you declared can certainly be used from Main
:
public delegate double Calculation(double number1, double number2);
public static void Main(string[] args)
{
Calculation x = null;
}
Demo: http://rextester.com/OOXL56068
Most likely you are confused about using delegates in general, and the static method Main
has nothing to do with your problem whatsoever.