What is a good rule for when to prepend members with 'this' (C#)?

Posted by RichAmberale on Stack Overflow See other posts from Stack Overflow or by RichAmberale
Published on 2010-04-28T18:08:46Z Indexed on 2010/04/28 18:17 UTC
Read the original article Hit count: 128

If I am accessing a member field, property, or method, I'm never sure when I should prepend it with 'this'.

I am not asking about cases where it is required, like in the case where a local variable has the same name. I am talking about cases where the meaning is exactly the same. Which is more readable? Are there any standards, best practices, or rules of thumb I should be following? Should it just be consistent throughout a class, or an entire code base?

© Stack Overflow or respective owner

Related posts about c#

Related posts about coding-style