[VB]Code Style Suggests Remove Unused Parameter for Event Handlers

  • Thread starter Thread starter Nathan Sokalski
  • Start date Start date
N

Nathan Sokalski

Guest
I am currently using Visual Studio 2019 Community. In the Error List window, it lists the option to remove unused parameters, such as the following:1431209.png

As you can probably guess, most of these parameters (sender & e) are from event handlers. If I removed them then the handlers would not meet the requirements (and I would think VS would know that). Even though it would be nice to be notified of unused parameters, seeing these for almost all of my event handlers is very frustrating, so I went to Code Style (Tools -> Options -> Text Editor -> Basic -> Code Style) and tried to change the "Avoid unused parameters" option. However, this did not seem to help. I would think that Visual Studio & Code Style would be smart enough to ignore unused parameters that are required for the handlers, but either way, is there a way to do anything about this, or do I need to manually disable IDE0060 in a configuration or project file? Thanks.


Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

Continue reading...
 
Back
Top