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: Non-accessed local variable

Last modified: 05 June 2024

This inspection reports local variables that are assigned a value, but are never used in any operation or returned by any method. This often indicates that some part of your code is not functioning as intended, or that the variable is redundant and should be removed to improve the readability.