Your full service technology partner! 
-Collapse +Expand
To/From Code
-Collapse +Expand Cross Ref Guide
-Collapse +Expand Members-Only
Sign in to see member-only pages.
   ► KBTo/From GuidesDelphi Prism  Print This     

Member Property (Delphi Prism and ASP Classic Cross Reference Guide)

By Mike Prestwood

Delphi Prism versus ASP Classic: A side by side comparison between Delphi Prism and ASP Classic.

OOP Basics

Some languages support object-based concepts such as Paradox, Access, and VB Classic. Other languages have OO extensions and fully support object orientation in a hybrid fashion (such as C++ and Dephi for Win32). Finally, some lanages such as C#, VB.Net, Prism, and Java are entirely written in OO. Meaning, every line of code written must occur within a class).

Member Property

[Other Languages] 
Delphi Prism:

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;
ASP Classic:   Property..Get..Let

ASP classic uses the property keyword and special Get and Let methods to both get and set the values of properties.

Syntax Example:
Class Cyborg
 Private FCyborgName
 Public Property Get CyborgName()
  CyborgName = FCyborgName
 End Property
 Public Property Let CyborgName(pCyborgName)
  FCyborgName = pCyborgName
 End Property
End Class

Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site:

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