Show/Hide Toolbars

XSharp

NoteThis command is only available in the FOXPRO dialect

Purpose

Declare a class name to the compiler.

Syntax

 [Attributes] DEFINE [Modifiers] CLASS <idClass> [AS <idParentClass>]  [OF <classLib>] [OLEPUBLIC]
 [ClassMembers]

 (ENDDEFINE | END DEFINE)

Arguments

AttributesAn optional list of one or more attributes that describe meta information for am entity, such as for example the [TestMethod] attribute on a method/function containing tests in a MsTest class library. Please note that Attributes must be on the same line or suffixed with a semi colon when they are written on the line above that keyword.

 

ModifiersAn optional list of modifiers that specify the visibility or scope of the entity, such as PUBLIC, PROTECTED, HIDDEN, INTERNAL, SEALED, ABSTRACT or STATIC.

 

 

<idClass>A valid identifier name for the class.  A class is an entity and, as such, shares the same name space as other entities.  This means that it is not possible to have a class and a global variable, for example, with the same name.

 

AS <idParentClass>The name of an existing class (called a superclass) from which the new class inherits methods and instance variables.
The AS <idParent> clause is mandatory when compiled with /fox1+, and option when compiled with /fox1-.
When compiled with /fox1+ the compiler assumes that the parent class is either the Custom class or a class derived from the Custom class.
 
OF <classLib>This clause is parsed but ignored in X#.

 

OLEPUBLICThis clause is parsed but ignored in X#.

 

ClassMembers

Fields and Properties

IMPLEMENTS Clause

ADD OBJECT Clause

COMMAttrib Clause

FUNCTIONS and PROCEDURES

 

 

Examples

 

See Also