Class VBArrayValue.VBArrayDimension
Represents an (indexer-enabled) array dimension.
public record VBArrayValue.VBArrayDimension : IEquatable<VBArrayValue.VBArrayDimension>
- Inheritance
-
VBArrayValue.VBArrayDimension
- Implements
- Inherited Members
Constructors
VBArrayDimension(Symbol, VBType, int, int)
Creates a array dimension of the specified VBType item type and the specified lower and upper bounds.
public VBArrayDimension(Symbol symbol, VBType itemType, int lBound, int uBound)
Parameters
Properties
IsInitialized
true when the LowerBound is less than or equal to the UpperBound.
public bool IsInitialized { get; }
Property Value
this[int]
Gets the VBTypedValue at the specified subscript if the subscript is within the array bounds.
public VBTypedValue? this[int subscript] { get; }
Parameters
subscriptint
Property Value
Remarks
💥 Semantics should throw a VBRuntimeErrorException.SubscriptOutOfRange if this indexer returns null.
Length
Returns the length of the array dimension, in terms of number of elements.
public int Length { get; }
Property Value
LowerBound
Gets the lower bound of this array dimension. Returns 0 if the array/dimension is not initialized.
public int LowerBound { get; init; }
Property Value
Remarks
This value is the underlying value returned by the LBound operator.
UpperBound
Gets the upper bound of this array dimension. Returns -1 if the array/dimension is not initialized.
public int UpperBound { get; init; }
Property Value
Remarks
This value is the underlying value returned by the UBound operator.
Methods
Deconstruct(out int, out int)
Allows deconstructing this record into its lower and upper boundaries.
public void Deconstruct(out int lBound, out int uBound)
Parameters
Remarks
var (lower, upper) = vbArrayValue.Dimensions[0];