Create a lambda from a delegate in CSharp
Description
The following code shows how to create a lambda from a delegate.
Example
using System;//w w w . j ava 2 s.co m
delegate int Transformer(int i);
class Test {
static void Main() {
Transformer square = x => x * x;
Console.WriteLine(square(3)); // 9
}
}
The code above generates the following result.