Today I was thinking about declaring this:
private delegate double ChangeListAction(string param1, int number);
but why not use this:
private Func<string, int, double> ChangeListAction;
or if ChangeListAction
would have no return value I could use:
private Action<string,int> ChangeListAction;
so where is the advantage in declaring a delegate with the delegate
keyword?
Is it because of .NET 1.1, and with .NET 2.0 came Action<T>
and with .NET 3.5 came Func<T>
?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…