T
Thomas H
Hi everyone, I've got a question that's more of a "style" question...
Do you guys reference "this" for every object that's inherited from
System.Web.UI.Page? For example, when you use the Session object, do you
say "this.Session.property" or do you just say "Session.property", and leave
off "this"?
I'm tending towards always using "this.Session" and "this.Response" and
"this.Label5.Text" - even though I don't have to. I have the feeling that
I'm over-using it.
Just wondering if it's proper style to always use "this"... or if "this"
should only be used when you have the different objects with the same name
in different scopes (i.e. you have a public strMyString but want to
reference the local private strMyString).
Thanks!
-Thomas H
Do you guys reference "this" for every object that's inherited from
System.Web.UI.Page? For example, when you use the Session object, do you
say "this.Session.property" or do you just say "Session.property", and leave
off "this"?
I'm tending towards always using "this.Session" and "this.Response" and
"this.Label5.Text" - even though I don't have to. I have the feeling that
I'm over-using it.
Just wondering if it's proper style to always use "this"... or if "this"
should only be used when you have the different objects with the same name
in different scopes (i.e. you have a public strMyString but want to
reference the local private strMyString).
Thanks!
-Thomas H