I am using Resharper for my C# project.
I have created some private global variables and typically I use the ‘this’ keyword to prefix the variable name (eg this.FirstName).
Resharper clearly wants me to use the underscore instead of ‘this’ but is actually bold enough to state that the ‘this’ keyword is redundant. There is no mention of this on the MSDN site; I was under the impression that regardless of what naming convention you use (use _ or this. or uppercase/lower case), it was ultimately down to the user’s choice (even the MSDN site mixes it up a bit (although never within the same classes)).
Can any one clarify if they’ve heard anything like this, or if you feel that the redundant comment is just Resharper’s opinion as the claim seems a little ludicrous.
“Redundant” means unnecessary. Since the keyword is clearly not necessary for the compiler in those cases, ReSharper is right.
Whether you have stylistic objections is another matter. I’m sure ReSharper can be configured to ignore those uses if that suits you better.