An anonymous function has no name.
Types of anonymous functions:
- Lambda Expressions
- Anonymous Methods
delegate void TestAnonymousFunctionDelegate(string s);
// A delegate can be initialized with inline code - anonymous method
del1("This is anonymous method.");
// A delegate can be initialized with a lambda expression.
TestAnonymousFunctionDelegate del2 = (x) => { MessageBox.Show(x); };del2("This is lambda expression.");
<< Multicast delegates Events >>