I.T. Discussion Community!
-Collapse +Expand
To/From Code
-Collapse +Expand Members-Only
Sign in to see member-only pages.
   ► KBTo/From GuidesDelphi Prism  Print This     

Member Modifier

Languages Focus

Traditional private, protected, public, etc. member modifiers are documented under the member visibility topic of the Cross Reference Encyclopedia. With member modifiers here, we address additional member modifiers such as method and field modifiers.

Delphi Prism:  "Member Modifiers"

Prism supports a full suite of member modifiers. Prism virtuality modifiers are virtual, override, final, and reintroduce.

Prism general modifiers are abstract, empty, async, external, locked, unsafe, implements, and iterator.

Not all member types support all member modifiers. For example, member fields support only readonly and implements.

Syntax Example:
Cyborg = public class(System.Object)
public
  method Speak(pMessage: String); virtual;
end;
 
Series888 = public class(Cyborg)
public
  method Speak(pMessage: String); override;
end;




Cross Reference Examples:

ASP Classic:  "Member Modifiers" Default

Other than visibility modifiers Public and Private, the only other member modifier available in ASP Classic is Default which is used only with the Public keyword in a class block. It indicates that the sub, function, or property is the default method for the class. You can have only one Default per class.

More Info / Comment
C#:  "Member Modifiers"

The method modifiers are abstract, extern, new, partial, sealed, virtual, and override. Specify C# member modifiers as follows:

abstract SomeMethod() {..}

The field modifiers are const, readonly, static, volatile. Specify field modifiers as follows:

readonly int MyAge;

More Info / Comment
Corel Paradox:  "Member Modifiers" Not Supported
Delphi:  "Member Modifiers"

Specify Delphi member modifiers as follows:

reintroduce; overload; [binding modifier]; [calling convention]; abstract; [warning]

The binding modifiers are virtual, dynamic, or override.

The calling conventions are register, pascal, cdecl, stdcall, or safecall.

The warnings are platform, deprecated, or library.

Additional directives include reintroduce, abstract, class, static, overload, and message.

Syntax Example:
TCyborg = class(TObject)
public
  procedure Speak(pMessage: String); virtual;
end;
 
TSeries888 = class(TCyborg)
public
  procedure Speak(pMessage: String); override;
end;
VB.Net:  "Member Modifiers"

The method modifiers include�MustOverride,�NotOverridable, Overridable, Overrides. Specify�VB.Net member modifiers as follows:

Public Overrides Function SomeFunction() As Double

The field modifiers include ReadOnly and Shared. Specify field modifiers as follows:

Public ReadOnly SomeField As String

More Info / Comment




-
   Contact Us!
 
PrestwoodBoards.com was developed and is maintainted by me. Do you have a question or suggestion? Do you see a problem? Contact me now. My goal is to build an ad-free and spam-free source of I.T. information with many contributers (ok to promote your website/company in your bio). Yes, my company Prestwood IT Solutions is mentioned in my bio which shows with every post, but you can contribute and promote your pet project too!

2,930 People Online Now!!  
Sign In to see who's online now!  Not a member? Join now. It's free!
Show more stats...


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech