Search Results for

    Show / Hide Table of Contents

    Struct NumeralValue<TLanguageUnits>

    A numeral value with an associated unit if there is one.
    Some numeral systems have special characters that indicate what the number is for, which is what the Unit field is for.

    Implements
    IEquatable<NumeralValue<TLanguageUnits>>
    IComparable<NumeralValue<TLanguageUnits>>
    Namespace: Romanization
    Assembly: Romanization.NET.dll
    Syntax
    public struct NumeralValue<TLanguageUnits> : IEquatable<NumeralValue<TLanguageUnits>>, IComparable<NumeralValue<TLanguageUnits>> where TLanguageUnits : struct
    Type Parameters
    Name Description
    TLanguageUnits

    Constructors

    | Improve this Doc View Source

    NumeralValue(Decimal, Nullable<TLanguageUnits>)

    Constructs a new NumeralValue<TLanguageUnits> with a value and unit.

    Declaration
    public NumeralValue(decimal value, TLanguageUnits? unit = null)
    Parameters
    Type Name Description
    System.Decimal value

    The value.

    System.Nullable<TLanguageUnits> unit

    The unit the value is in, if any.

    Fields

    | Improve this Doc View Source

    Unit

    The unit of the value, if known. Some numeral systems have symbols built in that convey the unit the number is of.

    Declaration
    public readonly TLanguageUnits? Unit
    Field Value
    Type Description
    System.Nullable<TLanguageUnits>
    | Improve this Doc View Source

    Value

    The numeric value.

    Declaration
    public readonly decimal Value
    Field Value
    Type Description
    System.Decimal

    Methods

    | Improve this Doc View Source

    CompareTo(NumeralValue<TLanguageUnits>)

    Declaration
    public int CompareTo(NumeralValue<TLanguageUnits> other)
    Parameters
    Type Name Description
    NumeralValue<TLanguageUnits> other
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    Equals(NumeralValue<TLanguageUnits>)

    Declaration
    public bool Equals(NumeralValue<TLanguageUnits> other)
    Parameters
    Type Name Description
    NumeralValue<TLanguageUnits> other
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    Operators

    | Improve this Doc View Source

    Equality(NumeralValue<TLanguageUnits>, NumeralValue<TLanguageUnits>)

    Checks for equality between two NumeralValue<TLanguageUnits> instances.

    Declaration
    public static bool operator ==(NumeralValue<TLanguageUnits> left, NumeralValue<TLanguageUnits> right)
    Parameters
    Type Name Description
    NumeralValue<TLanguageUnits> left

    The left side of the operator.

    NumeralValue<TLanguageUnits> right

    The right side of the operator.

    Returns
    Type Description
    System.Boolean

    Whether left and right are value-equal.

    | Improve this Doc View Source

    Inequality(NumeralValue<TLanguageUnits>, NumeralValue<TLanguageUnits>)

    Checks for inequality between two NumeralValue<TLanguageUnits> instances.

    Declaration
    public static bool operator !=(NumeralValue<TLanguageUnits> left, NumeralValue<TLanguageUnits> right)
    Parameters
    Type Name Description
    NumeralValue<TLanguageUnits> left

    The left side of the operator.

    NumeralValue<TLanguageUnits> right

    The right side of the operator.

    Returns
    Type Description
    System.Boolean

    Whether left and right are not value-equal.

    Implements

    IEquatable<>
    IComparable<>
    • Improve this Doc
    • View Source
    In This Article
    Back to top Romanization.NET