In programming you can use the this keyword
this.Textbox
or just
Textbox
What is the best practice?
Some benefits I can see is that using this makes it easier to see in intellisense and makes it easier to understand that it is a property.
Currently I don’t use this… I read in some article somewhere that the guy removed all the references, but I don’t remember why.
What are the pros and cons of using the this keyword?
Using
thissystematically will mean that you don’t fall into a trap of referring to a local variable when in fact you want a member ofthis.The downside: using
thiswill make your code more verbose.It’s really up to personal preference.