Feature Request for inspecting iteration variables

Given the following piece of code:

For i = 1 To cdlDruckDialogPrint.PrinterSettings.Copies
Next i

R# correctly gives a warning "Value assigned is not used in any execution path". I need to iterate to fullfill the requirement but i don't need to use the iteration variable. This type of for loop occures several times in the code. I won't surpress the warning generally because i loose the ability to dtect unused variables. But as there are a lot of occurences of this patterns it will be exhausting to find all occurences and surpress the warning with a "Resharper disable..." comment. I don't know if it's possible, but it would be nice if there is an option to generally surpress the warning in for loops (or even better if i can define it myself by a template).


Please sign in to leave a comment.