Пример #1
0
        static OrderedNumeric()
        {
            OrderedNumeric <short> .InitializeArithmetic(default(Arithmetics.Int16));

            OrderedNumeric <int> .InitializeArithmetic(default(Arithmetics.Int32));

            OrderedNumeric <long> .InitializeArithmetic(default(Arithmetics.Int64));

            OrderedNumeric <ushort> .InitializeArithmetic(default(Arithmetics.UInt16));

            OrderedNumeric <uint> .InitializeArithmetic(default(Arithmetics.UInt32));

            OrderedNumeric <ulong> .InitializeArithmetic(default(Arithmetics.UInt64));

            OrderedNumeric <float> .InitializeArithmetic(default(Arithmetics.Single));

            OrderedNumeric <double> .InitializeArithmetic(default(Arithmetics.Double));

            OrderedNumeric <decimal> .InitializeArithmetic(default(Arithmetics.Decimal));
        }
Пример #2
0
 public bool Equals(OrderedNumeric <T> other)
 => Value.Equals(other.Value);
Пример #3
0
 public bool Equals <S>(OrderedNumeric <S> other)
     where S : IEquatable <S>, IComparable <S>
 => Value.Equals(other.Value);
Пример #4
0
 public int CompareTo(OrderedNumeric <T> other)
 => Implementation.Compare(Value, other.Value);