Class VBVariantType
A VBIntrinsicType<T> representing the Variant data type.
public sealed record VBVariantType : VBIntrinsicType<object>, IEquatable<VBType>, IEquatable<VBIntrinsicType>, IEquatable<VBIntrinsicType<object>>, IEquatable<VBVariantType>
- Inheritance
-
VBVariantType
- Implements
- Inherited Members
- Extension Methods
Remarks
The managed type of a value of this data type is object.
👉 The VBVariant subtype can be any VBType including VBVariant, or otherwise semantically invalid data types such as VBUnknownType.
Constructors
VBVariantType(VBType)
A VBIntrinsicType<T> representing the Variant data type.
public VBVariantType(VBType SubType)
Parameters
SubTypeVBTypeThe variant subtype, or wrapped data type.
Remarks
The managed type of a value of this data type is object.
👉 The VBVariant subtype can be any VBType including VBVariant, or otherwise semantically invalid data types such as VBUnknownType.
Properties
DefaultValue
Gets the default value for this data type.
public override VBVariantValue DefaultValue { get; }
Property Value
Remarks
⚠️ Derived types must back the implementation of this property with a thread-safe private static readonly Lazy<T>.
Failure to do so would lock up the static context initialization of the StaticSymbol symbols.
SubType
The variant subtype, or wrapped data type.
public VBType SubType { get; init; }
Property Value
Subtype
The variant subtype, or wrapped data type.
public VBType Subtype { get; }
Property Value
TypeInfo
The Variant data type.
public static VBVariantType TypeInfo { get; }
Property Value
Methods
CreateValue(IBindingHandle)
Recovers the wrapped VBTypedValue boxed into handle as a
VBRuntimeVariantValue — the same pattern
CreateValue(IBindingHandle) uses for an array — so a Variant read back from storage
carries the very value that was actually stored, never a fresh, unrelated Empty.
public override VBTypedValue CreateValue(IBindingHandle handle)
Parameters
handleIBindingHandle