Solved

Camel Case / Pascal Case / Class Properties

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

861 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