I'm pretty new to c#, so my question might be simple, but here goes.
I've have been trying to work with delegates, and is kinda stuck with this problem.
.....
public delegate double delegateA();
public delegate double delegateB();
public static double myFunc()
{
return 0;
}
public static delegateA myTest()
{
return myFunc;
}
static void Main(string[] args)
{
delegateB myFuncDelegate;
myFuncDelegate = myTest(); // <-- Error: Cannot implicitly convert type....
}
.....
I don't know how to make this conversion work, unless using the same delegate as type. But in my project, it would be more pretty for the delegate's to have different names (as they exist in different classes.
Hope you can help me.