Class VBTypedValue
Represents any typed value.
public abstract record VBTypedValue : VBRuntimeEntity, IEquatable<VBRuntimeEntity>, IEquatable<VBTypedValue>
- Inheritance
-
VBTypedValue
- Implements
- Derived
- Inherited Members
Remarks
This class is at the base of the type hierarchy for all typed values.
Constructors
VBTypedValue(VBType, Symbol)
Represents any typed value.
protected VBTypedValue(VBType TypeInfo, Symbol ResolvedSymbol)
Parameters
TypeInfoVBTypeThe
VBTypeof the value.ResolvedSymbolSymbolThe
Symbolassociated with the value, if one is resolved.
Remarks
This class is at the base of the type hierarchy for all typed values.
Properties
CultureInfo
A static and thread-safe reference to the "en-US" CultureInfo instance that derived values should use to ensure correct string/numeric conversions - this will almost certainly need to be revised to meet MS-VBAL.
public static CultureInfo CultureInfo { get; }
Property Value
Handle
public IBindingHandle Handle { get; init; }
Property Value
IsWithBlockVariable
true if this typed value is a With block variable.
public bool IsWithBlockVariable { get; init; }
Property Value
Remarks
A typed value serving as a With block variable should be a VBObjectValue or a VBVariantValue wrapping a VBObjectValue
that refers to a non-null object pointer (VBNothingValue).
ManagedValue
Gets a wrapper for the underlying managed value.
public ManagedInteropWrapper ManagedValue { get; init; }
Property Value
Size
The allocated size (in bytes) of this value.
public abstract int Size { get; }
Property Value
Methods
Describe()
Creates a new VBTypeDescValue that describes this value.
public VBTypeDescValue Describe()
Returns
GetTargetType()
Gets the described Target type of this value if the value is a VBTypeDescValue; yields the TypeInfo of this value otherwise.
public VBType GetTargetType()
Returns
Remarks
👉 The TypeInfo of a type descriptor value is a VBTypeDesc.
WithValue(ManagedInteropWrapper)
public VBTypedValue WithValue(ManagedInteropWrapper value)
Parameters
valueManagedInteropWrapper