When I add new event handler for any event, VS creates method like object_Click.
But ReSharper underlines this method as Warning, because all methods should not have any delimeters such as “_”.
How can I customize rules of ReSharper so that it doesn’t underline such methods? Or may be I should rename such methods?
Thanks in advance.
Personally, I’d suggest renaming the methods. Generally I think VS comes up with terrible names for both controls and events.
I prefer to make a method name say what it does, not what calls it. That promotes reuse as well. Admittedly the signature of an event handler is often not ideal for reuse – I’d argue that often a lambda expression calling a method with more sensible parameters would be useful:
but obviously the designer doesn’t support that 🙁
Of course, renaming all the methods is going to be more work than just changing the R# settings, if you can find some that work…