Class BoundMember
A member of an object whose declared type is a class (MS-VBAL §5.6.12), read - c.Value - or called with the arguments written
after it (§5.6.13) - c.Add 1, c.Item(1): a Sub, a Function or a Property Get of the class.
public sealed record BoundMember : BoundNode, IEquatable<BoundNode>, IEquatable<BoundMember>
- Inheritance
-
BoundMember
- Implements
- Inherited Members
Remarks
The binding is the resolution of the member in the class the owner is declared as, made once. The object the owner holds at run time is an instance of
that class, or of a class that implements it as an interface (§5.3.1.9), whose member is then the one implementing it: which one is a
fact of the object's class, decided once for each class the expression meets. A member that is a public variable of the class, a member of an object
declared Object or Variant is late-bound, and a field of a user-defined type is the record's: neither has a member to resolve, and only the
owner is bound (DeclaredClass and Member are null) - the member is found by name, from the value,
each time, as a member is found late-bound.
Constructors
BoundMember(ExpressionNode, MemberAccessExpressionNode, BoundNode?, VBClassModuleSymbol?, VBTypeMemberSymbol?, IndexExpressionNode?, ImmutableArray<BoundArgument>?)
A member of an object whose declared type is a class (MS-VBAL §5.6.12), read - c.Value - or called with the arguments written
after it (§5.6.13) - c.Add 1, c.Item(1): a Sub, a Function or a Property Get of the class.
public BoundMember(ExpressionNode Expression, MemberAccessExpressionNode Access, BoundNode? Owner, VBClassModuleSymbol? DeclaredClass, VBTypeMemberSymbol? Member, IndexExpressionNode? Arguments, ImmutableArray<BoundArgument>? BoundArguments = null)
Parameters
ExpressionExpressionNodeThe expression: the member access, or the index expression that calls it.
AccessMemberAccessExpressionNodeThe member access.
OwnerBoundNodeThe object the member is accessed on, bound; null for a member written with no object before the dot, which is a member of the target of the enclosing
Withblock (MS-VBAL §5.6.15).DeclaredClassVBClassModuleSymbolThe class the owner is declared as; null for an owner that is late-bound or a record.
MemberVBTypeMemberSymbolThe member of
DeclaredClassthe name resolves to; null when there is no class.ArgumentsIndexExpressionNodeThe arguments of a call; null for a member that is read, with no argument list.
BoundArgumentsImmutableArray<BoundArgument>?The argument of each parameter of
Memberafter itsMe, in order (BoundArgument); null for a member that is not resolved, or whose parameters the arguments do not map to.
Remarks
The binding is the resolution of the member in the class the owner is declared as, made once. The object the owner holds at run time is an instance of
that class, or of a class that implements it as an interface (§5.3.1.9), whose member is then the one implementing it: which one is a
fact of the object's class, decided once for each class the expression meets. A member that is a public variable of the class, a member of an object
declared Object or Variant is late-bound, and a field of a user-defined type is the record's: neither has a member to resolve, and only the
owner is bound (DeclaredClass and Member are null) - the member is found by name, from the value,
each time, as a member is found late-bound.
Properties
Access
The member access.
public MemberAccessExpressionNode Access { get; init; }
Property Value
Arguments
The arguments of a call; null for a member that is read, with no argument list.
public IndexExpressionNode? Arguments { get; init; }
Property Value
BoundArguments
The argument of each parameter of Member after its Me, in order (BoundArgument);
null for a member that is not resolved, or whose parameters the arguments do not map to.
public ImmutableArray<BoundArgument>? BoundArguments { get; init; }
Property Value
DeclaredClass
The class the owner is declared as; null for an owner that is late-bound or a record.
public VBClassModuleSymbol? DeclaredClass { get; init; }
Property Value
IsLateBound
Whether the owner is declared Object or Variant: what a member reached late-bound returns is a Variant, whatever the member declares
(MS-VBAL §5.6.12). An Integer property read through a Variant is a Variant holding the Integer, whose
arithmetic widens where an Integer's overflows (MS-VBA, recorded in Excel: oracle\s46 F11).
public bool IsLateBound { get; init; }
Property Value
Member
The member of DeclaredClass the name resolves to; null when there is no class.
public VBTypeMemberSymbol? Member { get; init; }
Property Value
Owner
The object the member is accessed on, bound; null for a member written with no object before the dot, which is a
member of the target of the enclosing With block (MS-VBAL §5.6.15).
public BoundNode? Owner { get; init; }