Struct SetCoercionResult
The result of a MS-VBAL 5.5.2.2 Set-coercion (run-time semantics) evaluation.
public readonly record struct SetCoercionResult : IEquatable<SetCoercionResult>
- Implements
- Inherited Members
Constructors
SetCoercionResult(VBTypedValue?, VBRuntimeErrorInfo?)
The result of a MS-VBAL 5.5.2.2 Set-coercion (run-time semantics) evaluation.
public SetCoercionResult(VBTypedValue? Result, VBRuntimeErrorInfo? ErrorInfo)
Parameters
ResultVBTypedValueThe coerced object reference, if the coercion succeeded.
ErrorInfoVBRuntimeErrorInfoThe run-time error metadata, if the coercion failed.
Properties
ErrorInfo
The run-time error metadata, if the coercion failed.
public VBRuntimeErrorInfo? ErrorInfo { get; init; }
Property Value
IsSuccess
true if the coercion succeeded.
public bool IsSuccess { get; }
Property Value
Result
The coerced object reference, if the coercion succeeded.
public VBTypedValue? Result { get; init; }
Property Value
Methods
Error(VBRuntimeErrorInfo)
Creates a new (failed) SetCoercionResult with the specified error metadata.
public static SetCoercionResult Error(VBRuntimeErrorInfo error)
Parameters
errorVBRuntimeErrorInfo
Returns
Success(VBTypedValue)
Creates a new (successful) SetCoercionResult with the specified coerced value.
public static SetCoercionResult Success(VBTypedValue result)
Parameters
resultVBTypedValue