Show/Hide Toolbars

XSharp

NoteThis command is only available in the FOXPRO dialect

Purpose

Defines method and event functions and procedures for the class definition.

Syntax

 [Attributes] [Modifiers] FUNCTION | PROCEDURE Name[_ACCESS |_ASSIGN] [AS <idType>]

    ([cParamName | cArrayName[] [AS <idType>][@]] ) [AS <idType>]

    [HELPSTRING cHelpString] | THIS_ACCESS(cMemberName) [NODEFAULT]

       cStatements

 [ENDFUNC | ENDPROC]]

 

See the topics for FUNCTION and PROCEDURE for more details.

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.

 

AS <idType>Specifies the data type.  If omitted, then depending on the compiler options the type will be either USUAL or determined by the compiler.

 

_ACCESSThe _ACCESS or _ASSIGN suffixes specify to create an Access or Assign method for a property with the same name.
_ASSIGN

 

HELPSTRINGThe HELPSTRING clause is not supported in X#

 

THIS_ACCESSThe THIS_ACCESS clause is not supported in X#

 

NODEFAULTThe NODEFAULT clause is not supported in X#

 

ENDFUNC This may also be written as END FUNCTION

 

ENDPROC This may also be written as END PROCEDURE