Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Microsoft launches new open source codeplex foundation
Message
From
01/10/2009 11:25:28
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01424841
Message ID:
01427119
Views:
85
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform