ReSharper conventions for names of event handlers

For C# (or VB), make the following change:

ReSharper | Options | Languages | C# | C# Naming Style, Advanced settings…
Change ‘Event subscriptions on fields’ from $object$_On$event$ to $object$_$event$.

You may also want to add additional rules to entity kinds like ‘Types and namespaces’ to account for code-generated classes such as ‘Default’. For example, add a new rule with a ‘‘ Name Prefix and a Name Style ‘UpperCamelCase’.

Leave a Comment