Decimal Methods
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
The Decimal type exposes the following members.
| Name | Description | |
|---|---|---|
|
Add | Adds two specified Decimal values. |
|
Ceiling | Returns the smallest integral value greater than or equal to the specified decimal number. |
|
Compare | Compares two specified Decimal values and returns an integer that indicates whether the first value is greater than, less than, or equal to the second value. |
|
CompareTo(Decimal) | Compares this instance to a specified Decimal object and returns an integer that indicates whether the value of this instance is greater than, less than, or equal to the value of the specified Decimal. |
|
CompareTo(Object) | Compares this instance to a specified Object and returns an integer that indicates whether the value of this instance is greater than, less than, or equal to the value of the specified Object. |
|
Divide | Divides two specified Decimal values. |
|
Equals(Decimal) | Returns a value indicating whether this instance and a specified Decimal object represent the same value. |
|
Equals(Object) | Returns a value indicating whether this instance and a specified Object represent the same type and value. (Overrides ValueType.Equals(Object).) |
|
Equals(Decimal, Decimal) | Returns a value indicating whether two specified instances of Decimal represent the same value. |
|
Finalize | Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) |
|
Floor | Rounds a specified Decimal number to the closest integer toward negative infinity. |
|
GetBits | Converts the value of a specified instance of Decimal to its equivalent binary representation. |
|
GetHashCode | Returns the hash code for this instance. (Overrides ValueType.GetHashCode().) |
|
GetType | Gets the Type of the current instance. (Inherited from Object.) |
|
GetTypeCode | Returns the TypeCode for value type Decimal. |
|
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
|
Multiply | Multiplies two specified Decimal values. |
|
Negate | Returns the result of multiplying the specified Decimal value by negative one. |
|
Parse(String) | Converts the string representation of a number to its Decimal equivalent. |
|
Parse(String, NumberStyles) | Converts the string representation of a number in a specified style to its Decimal equivalent. |
|
Parse(String, IFormatProvider) | Converts the string representation of a number to its Decimal equivalent using the specified culture-specific format information. |
|
Parse(String, NumberStyles, IFormatProvider) | Converts the string representation of a number to its Decimal equivalent using the specified style and culture-specific format. |
|
Remainder | Computes the remainder after dividing two Decimal values. |
|
Round | Rounds a Decimal value to a specified number of decimal places. |
|
Subtract | Subtracts one specified Decimal value from another. |
|
ToByte | Converts the value of the specified Decimal to the equivalent 8-bit unsigned integer. |
|
ToDouble | Converts the value of the specified Decimal to the equivalent double-precision floating-point number. |
|
ToInt16 | Converts the value of the specified Decimal to the equivalent 16-bit signed integer. |
|
ToInt32 | Converts the value of the specified Decimal to the equivalent 32-bit signed integer. |
|
ToInt64 | Converts the value of the specified Decimal to the equivalent 64-bit signed integer. |
|
ToSByte | Converts the value of the specified Decimal to the equivalent 8-bit signed integer. |
|
ToSingle | Converts the value of the specified Decimal to the equivalent single-precision floating-point number. |
|
ToString() | Converts the numeric value of this instance to its equivalent string representation. (Overrides ValueType.ToString().) |
|
ToString(IFormatProvider) | Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information. |
|
ToString(String) | Converts the numeric value of this instance to its equivalent string representation, using the specified format. |
|
ToString(String, IFormatProvider) | Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information. |
|
ToUInt16 | Converts the value of the specified Decimal to the equivalent 16-bit unsigned integer. |
|
ToUInt32 | Converts the value of the specified Decimal to the equivalent 32-bit unsigned integer. |
|
ToUInt64 | Converts the value of the specified Decimal to the equivalent 64-bit unsigned integer. |
|
Truncate | Returns the integral digits of the specified Decimal; any fractional digits are discarded. |
|
TryParse(String, Decimal) | Converts the string representation of a number to its Decimal equivalent. A return value indicates whether the conversion succeeded or failed. |
|
TryParse(String, NumberStyles, IFormatProvider, Decimal) | Converts the string representation of a number to its Decimal equivalent using the specified style and culture-specific format. A return value indicates whether the conversion succeeded or failed. |
| Name | Description | |
|---|---|---|
|
IConvertible.ToBoolean | Infrastructure. For a description of this member, see IConvertible.ToBoolean. |
|
IConvertible.ToByte | Infrastructure. For a description of this member, see IConvertible.ToByte. |
|
IConvertible.ToChar | Infrastructure. This conversion is not supported. Attempting to use this method throws an InvalidCastException. |
|
IConvertible.ToDateTime | Infrastructure. This conversion is not supported. Attempting to use this method throws an InvalidCastException. |
|
IConvertible.ToDecimal | Infrastructure. For a description of this member, see IConvertible.ToDecimal. |
|
IConvertible.ToDouble | Infrastructure. For a description of this member, see IConvertible.ToDouble. |
|
IConvertible.ToInt16 | Infrastructure. For a description of this member, see IConvertible.ToInt16. |
|
IConvertible.ToInt32 | Infrastructure. For a description of this member, see IConvertible.ToInt32. |
|
IConvertible.ToInt64 | Infrastructure. For a description of this member, see IConvertible.ToInt64. |
|
IConvertible.ToSByte | Infrastructure. For a description of this member, see IConvertible.ToSByte. |
|
IConvertible.ToSingle | Infrastructure. For a description of this member, see IConvertible.ToSingle. |
|
IConvertible.ToType | Infrastructure. For a description of this member, see IConvertible.ToType. |
|
IConvertible.ToUInt16 | Infrastructure. For a description of this member, see IConvertible.ToUInt16. |
|
IConvertible.ToUInt32 | Infrastructure. For a description of this member, see IConvertible.ToInt32. |
|
IConvertible.ToUInt64 | Infrastructure. For a description of this member, see IConvertible.ToInt64. |
Show: