I have these lines of code.
class Program
{
public delegate void printer();
public static void Method()
{
Console.WriteLine("Hello");
}
static void Main(string[] args)
{
printer del = delegate { Method(); };
del();
Console.ReadKey();
}
}
Now what do i call this statement printer del = delegate { Method(); };
.
Surely it cant be called anonymous method because here i have a named method.
It's an anonymous delegate who's only function happens to be calling a named method.