Your full service technology partner! 
-Collapse +Expand
Search Prism Group:

-Collapse +Expand Prism To/From
-Collapse +Expand Prism Study Test
-Collapse +Expand Prism Store

Prestwood eMagazine

January Edition
Subscribe now! It's Free!
Enter your email:

   ► KBProgrammingDelphi PrismOOP   Print This     
  From the August 2011 Issue of Prestwood eMag
Prism OOP:
Delphi Prism Member Property (
Posted 14 years ago on 12/20/2008 and updated 7/9/2010
Prism Code Snippet:
 A flashcard from our Prism Flashcards Library
 A code snippet from our Prism Code Snippets Page


Delphi Prism Member Property

Like Delphi, Delphi Prism uses a special property keyword to both get and set the values of properties. The read and write keywords are used to get and set the value of the property directly or through an accessor method. For a read-only property, leave out the write portion of the declaration.

Prism also supports a shortcut syntax called implicit fields (known as auto-generated properties in C#):

property CyborgAge: Integer;

You can give properties any visibility you wish (private, protected, etc). It is common in Delphi and Delphi Prism to start member fields with "F" (FCName in our example) and drop the "F" with properties that manage member fields (CyborgName in our example).

Syntax Example:
Cyborg = class(System.Object)
  FCName: String;
  property CyborgName: String read FCName write FCName;


Share a thought or comment...
Comment 1 of 2

Although I don't think Microsoft makes it indisputably clear, this link:

Says that Properties should be Pascal Case and Protected (non-public?) instance fields should be Camel Case.

So I think in your example, CyborgName should be Pascal, as it is, but the backing field should be fcName or Camel Case.

Admittedly, they DON'T specifically say what to do with PRIVATE instance fields so that muddies the waters.  But if the backing fields are Pascal and properties are Pascal, then it gets harder to read the code and tell which is which.

Of course, personally, I think having case sensitivity in a language is dumb and the same thing goes for these kinds of "case conventions".

However, I believe that camel case for the (non-public) fields is the recommendation.


Posted 12 years ago

Comment 2 of 2

FWIW, good points. Nothing wrong with standards. I'll sweep thru and update all these examples. For what it's worth, I agree that private and protected probably could both be camel capped.

Posted 12 years ago
Write a Comment...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.

Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1275A1
Enter key:
Code Contributed By Mike Prestwood:

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Visit Profile

 KB Article #101740 Counter
Since 12/20/2008
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site:

©1995-2022 Prestwood IT Solutions.   [Security & Privacy]