resharper

Resharper - Disable once with comment - all instances in line


I have a method definition, and there is the same ReSharper warning on several of the parameters of the method.

If I right click on the first parameter and choose "Disable once per comment", it adds the comment, but the highlighting only disappears from the first parameter with the issue. If I right click on the second instance and choose the same option, it adds a second identical comment before the line, but the second instance is still highlighted.

How can I tell it that I want it to ignore all instances of that warning on the same line?

I even tried putting each parameter on a separate line, with the disable comment between each one (which is very ugly), but even that did not succeed in suppressing the second (and beyond) instances.


Solution

  • You set ReSharper to Disable and Enable more than one time. (Read the next line in the context menu or somewhere else close by.)