I've seen some guides or blogs that say using this
to access a class's own members is bad. However, I've also seen some places where professionals are accessing with this
. I tend to prefer explicitly using this
, since it seems to make it clear that the thing I'm accessing is part of the class.
this.MyProperty = this.GetSomeValue();
Is there some advantage or disadvantage to using this
? Is it simply a stylistic preference?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With