Skip to content

Intention behind "EventHandler" in CA1711 #53193

@TobiasKnauss

Description

@TobiasKnauss

Describe the issue or suggestion

I have created a class named EventHandler, which IMHO does not require more text in its name, since it is a nested class inside another class with meaningful name.

The analyzer now complains about the name (CA1711). What is the reason for having "EventHandler" in CA1711? I guess dozens, if not hundrets of classes in .NET carry the text "EventHandler" as part of their name, so these violate that rule, e.g.:

  • ContextMenuEventHandler
  • InitializingNewItemEventHandler
  • TextChangedEventHandler
  • ToolTipEventHandler

(from System.Windows.Controls)

  • ... (many!)

(from System.Windows.Forms)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions