Table of Contents

TCodeMemberMethod Class

Represents a method (procedure or function) declaration within a type.

Syntax

Unit: Bcl.Code.MetaClasses

TCodeMemberMethod = class(TCodeTypeMember);

Methods

Name Description
AddParameter Adds a parameter to this method.
AddSnippet Adds a raw code snippet statement to the method body.
AddSnippetFmt Adds a formatted raw code snippet statement to the method body.
DeclareVar Declares a local variable in the method body.
DefineReturnType Sets the return type for this method, making it a function.
FindParameter Searches for a parameter by name.
IndexOfParameter Returns the index of a parameter by name.
IndexOfVar Returns the index of a local variable by name.
RemoveParameter Removes a parameter by name from this method.

Properties

Name Description
Directives Gets or sets the method directives.
IsOperator Indicates whether this method is an operator overload.
IsStatic Indicates whether this is a class (static) method.
Parameters Gets the list of parameter declarations for this method.
ReturnType Gets or sets the return type reference for this method.
Statements Gets the list of statements in the method body.
Vars Gets the list of local variable declarations for this method.