ReSharper Warning – Access to Modified Closure
The reason for the warning is that inside a loop you might be accessing a variable that is changing. However, the “fix” isn’t really doing anything for you in this non-loop context. Imagine that you had a FOR loop and the if was inside it and the string declaration was outside it. In that case … Read more