Table of Contents

Interface IStdEnumVariantClass

Namespace
RDCore.SDK.Runtime.Abstract.StdLib
Assembly
RDCore.SDK.dll

The enumerator a For Each drives over an object that is not an array (MS-VBAL §5.4.2.4).

[StdLibClass("IEnumVARIANT", IsCreatable = false)]
public interface IStdEnumVariantClass

Remarks

MS-VBAL leaves the enumeration of an object "in an implementation-defined manner": the object's enumeration member (_NewEnum, VB_UserMemId -4) returns an enumerator, and the loop asks it for each member in turn. In MS-VBA the enumerator is a COM IEnumVARIANT, whose Next fills an array of Variants that VBA source cannot call; this is the same enumerator in a shape that source can, and is how a class written in VBA says what its members are: a class whose _NewEnum returns an object of a class that implements this one, or the enumerator of another collection, mItems.[_NewEnum].

👉 Every member is hidden: it is no part of what VBA source is meant to call, and it is not creatable.

Methods

Current()

The member the enumerator is at: the one MoveNext() last moved to.

[StdLibMember(null, IsHidden = true)]
RuntimeSemanticsEvaluationResult<VBVariantValue> Current()

Returns

RuntimeSemanticsEvaluationResult<VBVariantValue>

A RuntimeSemanticsEvaluationResult whose value is the member.

MoveNext()

Moves to the next member.

[StdLibMember(null, IsHidden = true)]
RuntimeSemanticsEvaluationResult<VBBooleanValue> MoveNext()

Returns

RuntimeSemanticsEvaluationResult<VBBooleanValue>

A RuntimeSemanticsEvaluationResult whose value is True when there is one, and False when the members have run out.

Reset()

Returns to before the first member.

[StdLibMember(null, IsHidden = true)]
RuntimeSemanticsEvaluationResult Reset()

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult encapsulating the result of the successful operation, or the error metadata otherwise.