A type contains a delegate that returns void, whose signature contains two parameters (the first an object and the second a type that is assignable to EventArgs), and the containing assembly targets .NET Framework 2.0.

Before .NET Framework 2.0, in order to pass custom information to the event handler, a new delegate had to be declared that specified a class that was derived from the System.EventArgs class. This is no longer true in .NET Framework 2.0, which introduced the System.EventHandler<TEventArgs> delegate. This generic delegate allows any class that is derived from EventArgs to be used together with the event handler.

The following example shows a delegate that violates the rule. In the Visual Basic example, comments describe how to modify the example to satisfy the rule. For the C# example, an example follows that shows the modified code.

The following example removes the delegate declaration from the previous example, which satisfies the rule, and replaces its use in the ClassThatRaisesEvent and ClassThatHandlesEvent methods by using the System.EventHandler<TEventArgs> delegate.