You are writing a code to handel events in your protram. You define a delegate named RectangleHandler like this:
public delegate void RectangleHandler(Rectangle rect);
you also create a variable of the RectangleHandler type as follows:
RectangleHandler handler;
Later in the program, you need to add a method named DisplayArea to the methodinvocation list of the handler variable. The signature of the DisplayArea method matches the signature of the RectangleHandler method. Any code that you write should not affect any existing event-handling code. Given this restriction, which of the following codes should you write?
Wähle eine der folgenden: