Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Camel Case / Pascal Case / Class Properties

Posted on 2006-11-16
2
Medium Priority
?
320 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 600 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 400 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

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
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.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Integration Management Part 2
Suggested Courses
Course of the Month12 days, 20 hours left to enroll

972 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