Anonymous method allow code blocks to be written in-line where delegate values are expected. Anonymous methods are similar to lambda functions in the Lisp programming language. C# 2.0 supports the creation of closures where anonymous methods access surrounding local variables and parameters.

In versions of C# previous to 2.0, the only way to declare a delegate was to use named methods. C# 2.0 introduces anonymous methods.

Creating anonymous methods is essentially a way to pass a code block as a delegate parameter.

For example:

// Create a delegate instance delegate void Del(int x);

// Instantiate the delegate using an anonymous method

Del d = delegate(int k) { /* ... */ };

By using anonymous method, you reduce the coding overhead in instantiating delegates by eliminating the need to create a separate method.

Now, there is no direct mapping for Anonymous method, but it uses the mapping for delegate method feature.