[dba-VB] C#: this.prefix

David McAfee davidmcafee at gmail.com
Wed Jul 2 12:00:23 CDT 2008


Same here, I use it out of (an old) habit from "Me." in VBA, on forms.

On Wed, Jul 2, 2008 at 8:54 AM, Gustav Brock <Gustav at cactus.dk> wrote:
> Hi all
>
> How rigorously are you prefixing controls and variables with "this."?
>
> Is it a good or bad coding practice to use it when not strictly needed?
> Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace?
>
> I've found, that I use it a lot - old habit from "Me." in VBA, I guess.
>
> /gustav
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>



More information about the dba-VB mailing list