Class VBNumericTypedValue
Represents any data type that is specified as a numeric type, mapping directly to "Any numeric type" specifications.
public abstract record VBNumericTypedValue : VBTypedValue, IEquatable<VBRuntimeEntity>, IEquatable<VBTypedValue>, IComparable<INumericValue>, IEquatable<VBNumericTypedValue>, INumericValue
- Inheritance
-
VBNumericTypedValue
- Implements
- Derived
- Inherited Members
Constructors
VBNumericTypedValue(VBType, Symbol)
Represents any data type that is specified as a numeric type, mapping directly to "Any numeric type" specifications.
protected VBNumericTypedValue(VBType TypeInfo, Symbol Symbol)
Parameters
TypeInfoVBTypeThe
VBTypeof the numeric value.SymbolSymbolThe symbol associated with this value.
Fields
SignificantIntegerDigits
The maximum possible number of significant digits retained in a String representation of a value of this type.
public const int SignificantIntegerDigits = 15
Field Value
Properties
ManagedValue
Gets a managed (.net) internal representation the numeric value. This is always a double.
public abstract double ManagedValue { get; init; }
Property Value
Symbol
The symbol associated with this value.
public Symbol Symbol { get; init; }
Property Value
Methods
CompareTo(INumericValue?)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public int CompareTo(INumericValue? other)
Parameters
otherINumericValueAn object to compare with this instance.
Returns
- int
A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value Meaning Less than zero This instance precedes otherin the sort order.Zero This instance occurs in the same position in the sort order as other.Greater than zero This instance follows otherin the sort order.
Equals(VBNumericTypedValue?)
Indicates whether the current object is equal to another object of the same type.
public virtual bool Equals(VBNumericTypedValue? other)
Parameters
otherVBNumericTypedValueAn object to compare with this object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
WithValue(double)
Gets a copy of this value, with the specified underlying value.
public INumericValue WithValue(double value)
Parameters
valuedoubleThe underlying value of the numeric value to be produced.