Solved

Camel Case / Pascal Case / Class Properties

Posted on 2006-11-16
2
300 Views
Last Modified: 2008-03-06
I try to use camel case for variables and pascal case for classes and their methods. But, for properties within a class, what is the "current" style preference?
0
Comment
Question by:GivenRandy
2 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 150 total points
ID: 17963296
Look at any .NET class. For example, ContextMenu (opened just now in my MSDN Library). Properties:
Handle
IsParent
MdiListItem
...

If you are interesting in programming style issues, use FxCop program, recommended for every .NET developer:
http://www.gotdotnet.com/Team/FxCop/
0
 
LVL 13

Assisted Solution

by:newyuppie
newyuppie earned 100 total points
ID: 17963983
sometimes you will have a property that encapsulates a private variable. i believe the guidelines are

Private _MyVar as Integer

Public ReadOnly Property MyVar as Integer
...
...
End Property

so variables which are encapsulated by properties you add an underscore to their private declaration.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now