ReSharper
 
Get ReSharper
Get your hands on the new features ahead of the release by joining the Early Access Program for ReSharper 2025.1! Learn more

Code inspection: Method return value is never used (private accessibility)

Last modified: 06 June 2024

This inspection reports non-public methods that are called somewhere in the local scope, but none of the calls use its return value. This often indicates that the method is not functioning as intended.

If the method does not change the program state, it might be redundant, and you may consider removing it. Otherwise, you can make the method void, which will make its intent clearer.