IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
KB
   ► KB ► > Member Property Posts  Print This     

Member Property Posts

"Member Property" Knowledge Base Posts

More...
  KB Article    

Mike Prestwood
1. Delphi Prism Member Property (property..read..write)

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.

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" ("FName" in our example) and drop the "F" with properties that manage member fields ("Name" in our example).

Posted to KB Topic: OOP
14 years ago, and updated 12 years ago
(2 Comments , last by mprestwood )

Code
Nothing New Since Your Last Visit
11904
Hits

Delphi Prism

Mike Prestwood
2. Delphi Member Property (property..read..write)

Delphi 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.

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

Posted to KB Topic: OOP
14 years ago, and updated 12 years ago
(5 Comments , last by Chatlie12.m )

Code
Nothing New Since Your Last Visit
14598
Hits

Pascal and Delphi Coding

Mike Prestwood
3. VB.Net Member Field

In VB.Net you can set the visibility of a member field to any visibility: private, protected, public, friend or protected friend.

You can intialize a member field with a default when declared. If you set the member field value in your constructor, it will override the default value.

Finally, you can use the Shared modifier (no instance required) and ReadOnly modifier (similar to a constant).

Posted to KB Topic: OOP
14 years ago, and updated 13 years ago

Code

Article
Nothing New Since Your Last Visit
13023
Hits

VB.Net Language

Mike Prestwood
4. Member Field

Also known as a Class Field.

A class variable defined with a specific class visibility, usually private visibility. A member property is different than a member field. A member property uses a member field to store values through accessor methods (getters and setters). For example, it is common to use a private member field to store the current value of a property. The current values of all the class member fields is the current state of the object.

Posted to KB Topic: Object Orientation (OO)
14 years ago, and updated 13 years ago

Definition
Nothing New Since Your Last Visit
11308
Hits

Coding & OO

Mike Prestwood
5. Delphi Prism Member Field

In Prism you can set the visibility of a member field to any visibility: private, protected, public, assembly and protected or assembly or protected. Prism supports the readonly modifier for member fields which is handy for constant like data. In this case, I chose not to preface my read-only member field with "F" so it's usage is just like a read-only property. Prism also support the class modifier (static data) for member fields. Delphi developers should notice the use of := to initialize a member field (in Delphi you use an =).

Posted to KB Topic: OOP
14 years ago, and updated 13 years ago
(1 Comments , last by mtiede )

Code

Article
Nothing New Since Your Last Visit
13760
Hits

Delphi Prism
More...


Icon Legend:
Since your last logged visit:
- New to you or updated since your last visit (sign in now to activate).
- NOT new to you since your last visit (sign in now to activate).
Sales Website: www.prestwood.com Or visit our legacy sales site: 
legacy.prestwood.com


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