Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Camel Case / Pascal Case / Class Properties

Posted on 2006-11-16
2
Medium Priority
?
317 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

721 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