Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Microsoft launches new open source codeplex foundation
Message
De
01/10/2009 11:25:28
 
 
À
01/10/2009 03:02:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01424841
Message ID:
01427119
Vues:
84
>It's also common to see camel case used for private variables - in fact backing fields often have the same name (differing only by case) as their public counterpart. E.g:
>public string SomeProperty
>{
>   //////
>}
>private string someProperty;
>Personally I like this construct - it's easy to identify the link between the two names elsewhere in code.


Personally, I don't like the "lower camel case" variation (http://en.wikipedia.org/wiki/CamelCase). The "upper camel case" variation is what's also known as Pascal case and that is what I always use.

I also go way back when it comes to naming fields for properties ... I prefer to use the "m_" convention. So, your example would look like this for me:
public string SomeProperty
{
   //////
}
private string m_SomeProperty;
I also dislike the variation of this that seems to be quite popular and that is just using the underscore, so it becomes:
public string SomeProperty
{
   //////
}
private string _SomeProperty;
I dunno ... it just seems harder to read. But maybe that's just me.

~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform