I define a Delegate type like :
delegate void DrawShape(Brush aBrush,Rectangle aRect);
Would you tell me why the below below methods of creating delegate object are all correct:
DrawShape DrawRectangleMethod = CreateGraphics().FillRectangle;
DrawShape AnotherDrawRectangleMethod = new DrawShape(CreateGraphics().FillRectangle);
Why can the method without “New” work correctly?
is possible thanks to C#2’s implicit method group conversions which are spec’d here.