Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void MyMethod(Delegate d){};
- void MyMethod(Expression exp){};
- void MyMethod(object obj){};
- MyMethod((int a) => a)
- "Cannot convert lambda expression to type 'object' because it is not a delegate type"
- void MyMethod(Func<int, int> d){};
- void MyMethod(Func<int, int> objFunc)
- void MyMethod(Action<int> func) { }
- void MyMethod(Action<int> lambdaHereLol)
- {
- lambdaHereLol(2);
- }
- var hurrDurr = 5;
- MyMethod(x => Console.Write(x * hurrDurr));
- MyMethod((Delegate)(Func<int, int>)((int a) => a));
- void MyMethod(Delegate d);
Add Comment
Please, Sign In to add comment