Struct PreciseDecimal
A decimal that is precise without rounding failure
Implements
System.IComparable
System.IConvertible
System.IFormattable
System.IComparable<System.Double>
System.IEquatable<System.Double>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Assembly: Simplic.CoreLib.dll
Syntax
public struct PreciseDecimal : IComparable, IConvertible, IFormattable, IComparable<double>, IEquatable<double>
Constructors
|
Improve this Doc
View Source
PreciseDecimal(PreciseDecimal)
Declaration
public PreciseDecimal(PreciseDecimal value)
Parameters
|
Improve this Doc
View Source
PreciseDecimal(Double)
Declaration
public PreciseDecimal(double value)
Parameters
Type |
Name |
Description |
System.Double |
value |
|
Methods
|
Improve this Doc
View Source
CompareTo(Double)
Declaration
public int CompareTo(double other)
Parameters
Type |
Name |
Description |
System.Double |
other |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
CompareTo(Object)
Declaration
public int CompareTo(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Equals(Double)
Declaration
public bool Equals(double other)
Parameters
Type |
Name |
Description |
System.Double |
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 |
|
Overrides
System.ValueType.Equals(System.Object)
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.ValueType.GetHashCode()
|
Improve this Doc
View Source
GetTypeCode()
Declaration
public TypeCode GetTypeCode()
Returns
Type |
Description |
System.TypeCode |
|
|
Improve this Doc
View Source
Declaration
public bool ToBoolean(IFormatProvider provider)
Parameters
Type |
Name |
Description |
System.IFormatProvider |
provider |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Declaration
public byte ToByte(IFormatProvider provider)
Parameters
Type |
Name |
Description |
System.IFormatProvider |
provider |
|
Returns
Type |
Description |
System.Byte |
|
|
Improve this Doc
View Source
Declaration
public char ToChar(IFormatProvider provider)
Parameters
Type |
Name |
Description |
System.IFormatProvider |
provider |
|
Returns
Type |
Description |
System.Char |
|
|
Improve this Doc
View Source
Declaration
public DateTime ToDateTime(IFormatProvider provider)
Parameters
Type |
Name |
Description |
System.IFormatProvider |
provider |
|
Returns
Type |
Description |
System.DateTime |
|
|
Improve this Doc
View Source
Declaration
public decimal ToDecimal(IFormatProvider provider)
Parameters
Type |
Name |
Description |
System.IFormatProvider |
provider |
|
Returns
Type |
Description |
System.Decimal |
|
|
Improve this Doc
View Source
Declaration
public double ToDouble(IFormatProvider provider)
Parameters
Type |
Name |
Description |
System.IFormatProvider |
provider |
|
Returns
Type |
Description |
System.Double |
|
|
Improve this Doc
View Source
Declaration
public short ToInt16(IFormatProvider provider)
Parameters
Type |
Name |
Description |
System.IFormatProvider |
provider |
|
Returns
Type |
Description |
System.Int16 |
|
|
Improve this Doc
View Source
Declaration
public int ToInt32(IFormatProvider provider)
Parameters
Type |
Name |
Description |
System.IFormatProvider |
provider |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Declaration
public long ToInt64(IFormatProvider provider)
Parameters
Type |
Name |
Description |
System.IFormatProvider |
provider |
|
Returns
Type |
Description |
System.Int64 |
|
|
Improve this Doc
View Source
Declaration
public sbyte ToSByte(IFormatProvider provider)
Parameters
Type |
Name |
Description |
System.IFormatProvider |
provider |
|
Returns
Type |
Description |
System.SByte |
|
|
Improve this Doc
View Source
Declaration
public float ToSingle(IFormatProvider provider)
Parameters
Type |
Name |
Description |
System.IFormatProvider |
provider |
|
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.ValueType.ToString()
|
Improve this Doc
View Source
Declaration
public string ToString(IFormatProvider provider)
Parameters
Type |
Name |
Description |
System.IFormatProvider |
provider |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ToString(String)
Declaration
public string ToString(string format)
Parameters
Type |
Name |
Description |
System.String |
format |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Declaration
public string ToString(string format, IFormatProvider provider)
Parameters
Type |
Name |
Description |
System.String |
format |
|
System.IFormatProvider |
provider |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Declaration
public object ToType(Type conversionType, IFormatProvider provider)
Parameters
Type |
Name |
Description |
System.Type |
conversionType |
|
System.IFormatProvider |
provider |
|
Returns
Type |
Description |
System.Object |
|
|
Improve this Doc
View Source
Declaration
public ushort ToUInt16(IFormatProvider provider)
Parameters
Type |
Name |
Description |
System.IFormatProvider |
provider |
|
Returns
Type |
Description |
System.UInt16 |
|
|
Improve this Doc
View Source
Declaration
public uint ToUInt32(IFormatProvider provider)
Parameters
Type |
Name |
Description |
System.IFormatProvider |
provider |
|
Returns
Type |
Description |
System.UInt32 |
|
|
Improve this Doc
View Source
Declaration
public ulong ToUInt64(IFormatProvider provider)
Parameters
Type |
Name |
Description |
System.IFormatProvider |
provider |
|
Returns
Type |
Description |
System.UInt64 |
|
Operators
|
Improve this Doc
View Source
Addition(PreciseDecimal, PreciseDecimal)
Declaration
public static PreciseDecimal operator +(PreciseDecimal d1, PreciseDecimal d2)
Parameters
Returns
|
Improve this Doc
View Source
Division(PreciseDecimal, PreciseDecimal)
Declaration
public static PreciseDecimal operator /(PreciseDecimal d1, PreciseDecimal d2)
Parameters
Returns
|
Improve this Doc
View Source
Equality(PreciseDecimal, PreciseDecimal)
Declaration
public static bool operator ==(PreciseDecimal c1, PreciseDecimal c2)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Explicit(PreciseDecimal to Double)
Explicit conversion from PrecisedDecimal to double.
Explicit: A cast operator is required.
Declaration
public static explicit operator double (PreciseDecimal value)
Parameters
Returns
Type |
Description |
System.Double |
|
|
Improve this Doc
View Source
Explicit(PreciseDecimal to Int32)
Explicit conversion from PrecisedDecimal to int.
Explicit: A cast operator is required.
Declaration
public static explicit operator int (PreciseDecimal value)
Parameters
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Explicit(PreciseDecimal to Int64)
Explicit conversion from PrecisedDecimal to long.
Explicit: A cast operator is required.
Declaration
public static explicit operator long (PreciseDecimal value)
Parameters
Returns
Type |
Description |
System.Int64 |
|
|
Improve this Doc
View Source
Explicit(PreciseDecimal to Single)
Explicit conversion from PrecisedDecimal to float.
Explicit: A cast operator is required.
Declaration
public static explicit operator float (PreciseDecimal value)
Parameters
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Explicit(PreciseDecimal to UInt32)
Explicit conversion from PrecisedDecimal to uint.
Explicit: A cast operator is required.
Declaration
public static explicit operator uint (PreciseDecimal value)
Parameters
Returns
Type |
Description |
System.UInt32 |
|
|
Improve this Doc
View Source
Explicit(PreciseDecimal to UInt64)
Explicit conversion from PrecisedDecimal to ulong.
Explicit: A cast operator is required.
Declaration
public static explicit operator ulong (PreciseDecimal value)
Parameters
Returns
Type |
Description |
System.UInt64 |
|
|
Improve this Doc
View Source
Explicit(Decimal to PreciseDecimal)
Explicit conversion from PrecisedDecimal to decimal?.
Explicit: A cast operator is required.
Declaration
public static explicit operator PreciseDecimal(decimal value)
Parameters
Type |
Name |
Description |
System.Decimal |
value |
|
Returns
|
Improve this Doc
View Source
Explicit(Int32 to PreciseDecimal)
Explicit conversion from PrecisedDecimal to int.
Explicit: A cast operator is required.
Declaration
public static explicit operator PreciseDecimal(int value)
Parameters
Type |
Name |
Description |
System.Int32 |
value |
|
Returns
|
Improve this Doc
View Source
GreaterThan(PreciseDecimal, PreciseDecimal)
Declaration
public static bool operator>(PreciseDecimal c1, PreciseDecimal c2)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
GreaterThanOrEqual(PreciseDecimal, PreciseDecimal)
Declaration
public static bool operator >=(PreciseDecimal c1, PreciseDecimal c2)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Implicit(Double to PreciseDecimal)
Implicit conversion from double to PrecisedDecimal.
Implicit: No cast operator is required.
Declaration
public static implicit operator PreciseDecimal(double value)
Parameters
Type |
Name |
Description |
System.Double |
value |
|
Returns
|
Improve this Doc
View Source
Inequality(PreciseDecimal, PreciseDecimal)
Declaration
public static bool operator !=(PreciseDecimal c1, PreciseDecimal c2)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
LessThan(PreciseDecimal, PreciseDecimal)
Declaration
public static bool operator <(PreciseDecimal c1, PreciseDecimal c2)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
LessThanOrEqual(PreciseDecimal, PreciseDecimal)
Declaration
public static bool operator <=(PreciseDecimal c1, PreciseDecimal c2)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Multiply(PreciseDecimal, PreciseDecimal)
Declaration
public static PreciseDecimal operator *(PreciseDecimal d1, PreciseDecimal d2)
Parameters
Returns
|
Improve this Doc
View Source
Subtraction(PreciseDecimal, PreciseDecimal)
Declaration
public static PreciseDecimal operator -(PreciseDecimal d1, PreciseDecimal d2)
Parameters
Returns
Implements
System.IComparable
System.IConvertible
System.IFormattable
System.IComparable<T>
System.IEquatable<T>