Duplicate post, see: When do you use the "this" keyword?
On almost every project I worked the "This" operator is used, when i start developing i was told that it is a good practice. is this really necessary does it gives you more readability?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Tools like Resharper have a built in hint saying ‘redundant qualifier,’ but I disagree with it and quickly disable the rule.
I always use the this qualifier because it lets me know at a glance whether or not the reference is a property/field, or a static class ref for example:
or
so:
Just my 2c.
-Oisin