Total .NET Analyzer Rule Documentation  

EventSecondArgumentType Rule

Use an EventArgs type for the second parameter of an event.

Remarks

Microsoft recommends that there should always be two parameters for all events. The second parameter of the event should be an EventArgs or EventArgs-derived type.

The 'e' parameter should be an appropriate and specific event class, and it should represents the state associated with the event.

Resolution

You should modify your event to have the state associated with the event as the second parameter, and make it an EventArgs or EventArgs-derived type. For example, the following event handlers follow Microsoft's guidelines:

' VB
Public Delegate Sub MouseEventHandler(sender As Object, e As EventArgs)

// C#
public delegate void MouseEventHandler(object sender, EventArgs e);

See Also

Event Usage Guidelines

Total .NET Analyzer Event Argument Count rule

Total .NET Analyzer Second Event Argument Name rule