Solved

Camel Case / Pascal Case / Class Properties

Posted on 2006-11-16
2
312 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Expression Evaluater 3 45
vb.net 1 month apart 11 38
VB.NET 2008 Winforms Signing 13 41
Help with opening combobox using VB.NET. 3 33
This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

680 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