Class VBErrorType
A VBIntrinsicType<T> representing the Error data type.
public record VBErrorType : VBIntrinsicType<int>, IEquatable<VBType>, IEquatable<VBIntrinsicType>, IEquatable<VBIntrinsicType<int>>, IEquatable<VBErrorType>
- Inheritance
-
VBErrorType
- Implements
- Derived
- Inherited Members
- Extension Methods
Remarks
The managed type of a value of this data type is int.
👉 This data type has no declaration semantics and is only indirectly usable as a Variant subtype.
VBMissingType is a kind of it: the Missing value is an error value.
Constructors
VBErrorType()
Creates the Error data type. Use TypeInfo.
public VBErrorType()
VBErrorType(string)
Creates a data type whose values are error values under another name.
protected VBErrorType(string name)
Parameters
namestringThe name of the data type.
Properties
DefaultValue
Gets the default value for this data type.
public override VBTypedValue 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.
MaxValue
Gets the maximum representable value for this data type.
public static VBErrorValue MaxValue { get; }
Property Value
MaximumStdErrorValue
Gets the maximum value for a standard error code.
public static int MaximumStdErrorValue { get; }
Property Value
MinValue
Gets the minimum representable value for this data type.
public static VBErrorValue MinValue { get; }
Property Value
MinimumStdErrorValue
Gets the minimum value for a standard error code.
public static int MinimumStdErrorValue { get; }
Property Value
TypeInfo
The Error data type.
public static VBErrorType TypeInfo { get; }
Property Value
Zero
Gets the value 0 (zero) representation of this data type.
public static VBErrorValue Zero { get; }
Property Value
Methods
CreateValue(IBindingHandle)
Creates a value of this type bound to handle.
public override VBTypedValue CreateValue(IBindingHandle handle)
Parameters
handleIBindingHandle
Returns
Remarks
The base implementation throws: only types that can hold a runtime value override this
(matches the intent of the removed VBTypedValueFactory.CreateValue(VBType) switch,
which returned null for the rest).