CxMemberMethod

Description

sealed class Tinman.Core.Cx.Declarations.CxMemberMethod

A type member that defines a callable method with with zero or more type and value parameters and an optional return value.

...
T3 Method<T1, T2, T3>(this T1 p0, ref T2 p1, out T2 p2, [A] int p3, int p4)
  where T1 : class, Type1, ..., TypeN, new()
  where T2 : struct;

...
void Method()
{
}

A method may overload an operator, in which case CxId.Op of ICxIdContainer.Name returns the overloaded operator and the method declaration has the following syntax:

public static T3 operator ?(T1 a) { ... }
public static T3 operator ?(T1 a, T2 b) { ... }

where ? is one of the overloadable operators (see CxOperator).

ICxTypeContainer.Type returns the return type of this method.

Public / Constructors

Cx​Member​Method


public constructor CxMemberMethod → (8)

modifiers in : CxModifiers

See ICxModifiersContainer.Modifiers.

returnType in : CxType

[not-null]
See ICxTypeContainer.Type.

name in : CxId

See ICxIdContainer.Name. Use CxId.FromOp for overloading an operator.

xmlDoc opt : CxXmlDoc = null

See ICxXmlDocContainer.XmlDoc.

attributes opt : IBagConst<CxAttribute> = null

The attribute list of the method or null for an empty list. See ICxAttributesContainer.Attributes.

typeParameters opt : IBagConst<CxTypeParameter> = null

The generic type parameter list of the method or null for an empty list. See ICxTypeParametersContainer.TypeParameters.

parameters opt : IBagConst<CxParameter> = null

The parameter list of the method or null for an empty list. See ICxParametersContainer.Parameters.

body opt : CxStatementBlock = null

See Body.

Creates a new instance of CxMemberMethod.

Public / Attributes

Body


[Constant]
public attribute Body → (get)

value : CxStatementBlock

The method body or null if the method does not have a body.

Returns the method body.

Op


[Constant]
public attribute Op → (get)

value : CxOperator

The overloaded operator or CxOperator.None.

Returns the operator that is overloaded by this method.