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

Member Modifier (Cross Ref > OOP Basics)

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.

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)
  procedure Speak(pMessage: String); virtual;
TSeries888 = class(TCyborg)
  procedure Speak(pMessage: String); override;
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)
  method Speak(pMessage: String); virtual;
Series888 = public class(Cyborg)
  method Speak(pMessage: String); override;
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

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

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