Decimal Members
The Decimal type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() |
Decimal(Double) |
Initializes a new instance of Decimal to the value of the specified double-precision floating-point number.
|
![]() |
Decimal(Int32) |
Initializes a new instance of Decimal to the value of the specified 32-bit signed integer.
|
![]() |
Decimal(UInt32) |
Initializes a new instance of Decimal to the value of the specified 32-bit unsigned integer.
|
![]() |
Decimal(Single) |
Initializes a new instance of Decimal to the value of the specified single-precision floating-point number.
|
![]() |
Decimal(Int64) |
Initializes a new instance of Decimal to the value of the specified 64-bit signed integer.
|
![]() |
Decimal(UInt64) |
Initializes a new instance of Decimal to the value of the specified 64-bit unsigned integer.
|
![]() |
Decimal(Int32, Int32, Int32, Boolean, Byte) |
Initializes a new instance of Decimal from parameters specifying the instance's constituent parts.
|
Methods
Name | Description | |
---|---|---|
![]() |
Abs | |
![]() ![]() |
Add |
Adds two specified Decimal values.
|
![]() |
Ceiling()()()() | |
![]() ![]() |
Ceiling(Decimal) |
Returns the smallest integral value that is greater than or equal to the specified decimal number.
|
![]() ![]() |
Compare |
Compares two specified Decimal values.
|
![]() |
ComparedTo | |
![]() |
CompareTo(Decimal) |
Compares this instance to a specified Decimal object and returns a comparison of their relative values.
|
![]() |
CompareTo(Object) |
Compares this instance to a specified object and returns a comparison of their relative values.
|
![]() |
DecimalPlaces | |
![]() ![]() |
Divide |
Divides two specified Decimal values.
|
![]() |
DividedToIntegerBy | |
![]() |
Equals(Decimal) |
Returns a value indicating whether this instance and a specified Decimal object represent the same value.
|
![]() ![]() |
Equals(Decimal, Decimal) |
Returns a value indicating whether two specified instances of Decimal represent the same value.
|
![]() ![]() |
Exp | |
![]() |
Exponential | |
![]() ![]() |
Floor(Decimal) |
Rounds a specified Decimal number to the closest integer toward negative infinity.
|
![]() |
Floor()()()() | |
![]() |
Format(String) | |
![]() |
Format(String, IFormatProvider) | |
![]() |
IsFinite | |
![]() |
IsInteger | |
![]() |
IsNaN | |
![]() |
IsNegative | |
![]() |
IsZero | |
![]() ![]() |
Ln(Decimal) | |
![]() |
Ln()()()() | |
![]() ![]() |
Log(Decimal, Decimal) | |
![]() |
Log(Decimal) | |
![]() ![]() |
Max | |
![]() ![]() |
Min | |
![]() ![]() |
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, IFormatProvider) | |
![]() ![]() |
Pow(Decimal, Decimal) | |
![]() |
Pow(Double) | |
![]() |
Precision | |
![]() ![]() |
Random |
Returns a new Decimal with a pseudo-random value equal to or greater than 0 and less than 1.
|
![]() ![]() |
Remainder |
Computes the remainder after dividing two Decimal values.
|
![]() ![]() |
Round(Decimal) |
Rounds a decimal value to the nearest integer.
|
![]() ![]() |
Round(Decimal, Int32) |
Rounds a Decimal value to a specified number of decimal places.
|
![]() ![]() |
Round(Decimal, Int32, MidpointRounding) | |
![]() ![]() |
Round(Decimal, MidpointRounding) | |
![]() |
Round()()()() | |
![]() ![]() |
SetConfig |
Configures the 'global' settings for this particular Decimal constructor.
|
![]() ![]() |
Sqrt(Decimal) | |
![]() |
Sqrt()()()() | |
![]() ![]() |
Subtract |
Subtracts one specified Decimal value from another.
|
![]() ![]() |
ToByte |
Converts the value of the specified Decimal to the equivalent 8-bit unsigned integer.
|
![]() ![]() |
ToChar | |
![]() |
ToDecimalPlaces | |
![]() ![]() |
ToDouble |
Converts the value of the specified Decimal to the equivalent double-precision floating-point number.
|
![]() |
ToExponential | |
![]() |
ToFixed | |
![]() |
ToFormat()()()() | |
![]() |
ToFormat(Int32) | |
![]() |
ToFormat(Int32, MidpointRounding) | |
![]() |
ToFormat(Int32, MidpointRounding, IFormatProvider) | |
![]() |
ToFormat(Int32, MidpointRounding, DecimalFormatConfig) | |
![]() |
ToFormat(DecimalFormatConfig) | |
![]() ![]() |
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.
|
![]() |
ToPrecision | |
![]() ![]() |
ToSByte |
Converts the value of the specified Decimal to the equivalent 8-bit signed integer.
|
![]() |
ToSignificantDigits | |
![]() ![]() |
ToSingle |
Converts the value of the specified Decimal to the equivalent single-precision floating-point number.
|
![]() |
ToString(String) |
Converts the numeric value of this instance to its equivalent string representation, using the specified format.
|
![]() |
ToString(String, IFormatProvider) | |
![]() |
ToString(IFormatProvider) | |
![]() |
ToString()()()() |
Converts the numeric value of this instance to its equivalent string representation.
|
![]() ![]() |
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, IFormatProvider, Decimal%) |
Operators
Name | Description | |
---|---|---|
![]() ![]() |
Addition |
Adds two specified Decimal values.
|
![]() ![]() |
Decrement |
Decrements the Decimal operand by one.
|
![]() ![]() |
Division |
Divides two specified Decimal values.
|
![]() ![]() |
Equality |
Returns a value that indicates whether two Decimal values are equal.
|
![]() ![]() |
Explicit Narrowing Explicit Explicit Explicit (Single to Decimal) |
Defines an explicit conversion of a single-precision floating-point number to a Decimal.
|
![]() ![]() |
Explicit Narrowing Explicit Explicit Explicit (Double to Decimal) |
Defines an explicit conversion of a double-precision floating-point number to a Decimal.
|
![]() ![]() |
Explicit Narrowing Explicit Explicit Explicit (Decimal to Byte) |
Defines an explicit conversion of a Decimal to an 8-bit unsigned integer.
|
![]() ![]() |
Explicit Narrowing Explicit Explicit Explicit (Decimal to SByte) |
Defines an explicit conversion of a Decimal to an 8-bit signed integer.
|
![]() ![]() |
Explicit Narrowing Explicit Explicit Explicit (Decimal to Char) |
Defines an explicit conversion of a Decimal to a Unicode character.
|
![]() ![]() |
Explicit Narrowing Explicit Explicit Explicit (Decimal to Int16) |
Defines an explicit conversion of a Decimal to a 16-bit signed integer.
|
![]() ![]() |
Explicit Narrowing Explicit Explicit Explicit (Decimal to UInt16) |
Defines an explicit conversion of a Decimal to a 16-bit unsigned integer.
|
![]() ![]() |
Explicit Narrowing Explicit Explicit Explicit (Decimal to Int32) |
Defines an explicit conversion of a Decimal to a 32-bit signed integer.
|
![]() ![]() |
Explicit Narrowing Explicit Explicit Explicit (Decimal to UInt32) |
Defines an explicit conversion of a Decimal to a 32-bit unsigned integer.
|
![]() ![]() |
Explicit Narrowing Explicit Explicit Explicit (Decimal to Int64) |
Defines an explicit conversion of a Decimal to a 64-bit signed integer.
|
![]() ![]() |
Explicit Narrowing Explicit Explicit Explicit (Decimal to UInt64) |
Defines an explicit conversion of a Decimal to a 64-bit unsigned integer.
|
![]() ![]() |
Explicit Narrowing Explicit Explicit Explicit (Decimal to Single) |
Defines an explicit conversion of a Decimal to a single-precision floating-point number.
|
![]() ![]() |
Explicit Narrowing Explicit Explicit Explicit (Decimal to Double) |
Defines an explicit conversion of a Decimal to a double-precision floating-point number.
|
![]() ![]() |
GreaterThan | |
![]() ![]() |
GreaterThanOrEqual | |
![]() ![]() |
Implicit Widening Implicit Implicit Implicit (Byte to Decimal) |
Defines an explicit conversion of an 8-bit unsigned integer to a Decimal.
|
![]() ![]() |
Implicit Widening Implicit Implicit Implicit (SByte to Decimal) |
Defines an explicit conversion of an 8-bit signed integer to a Decimal.
|
![]() ![]() |
Implicit Widening Implicit Implicit Implicit (Int16 to Decimal) |
Defines an explicit conversion of a 16-bit signed integer to a Decimal.
|
![]() ![]() |
Implicit Widening Implicit Implicit Implicit (UInt16 to Decimal) |
Defines an explicit conversion of a 16-bit unsigned integer to a Decimal.
|
![]() ![]() |
Implicit Widening Implicit Implicit Implicit (Char to Decimal) |
Defines an explicit conversion of a Unicode character to a Decimal.
|
![]() ![]() |
Implicit Widening Implicit Implicit Implicit (Int32 to Decimal) |
Defines an explicit conversion of a 32-bit signed integer to a Decimal.
|
![]() ![]() |
Implicit Widening Implicit Implicit Implicit (UInt32 to Decimal) |
Defines an explicit conversion of a 32-bit unsigned integer to a Decimal.
|
![]() ![]() |
Implicit Widening Implicit Implicit Implicit (Int64 to Decimal) |
Defines an explicit conversion of a 64-bit signed integer to a Decimal.
|
![]() ![]() |
Implicit Widening Implicit Implicit Implicit (UInt64 to Decimal) |
Defines an explicit conversion of a 64-bit unsigned integer to a Decimal.
|
![]() ![]() |
Increment |
Increments the Decimal operand by 1.
|
![]() ![]() |
Inequality |
Returns a value that indicates whether two Decimal objects have different values.
|
![]() ![]() |
LessThan | |
![]() ![]() |
LessThanOrEqual | |
![]() ![]() |
Modulus |
Returns the remainder resulting from dividing two specified Decimal values.
|
![]() ![]() |
Multiply |
Multiplies two specified Decimal values.
|
![]() ![]() |
Subtraction |
Subtracts two specified Decimal values.
|
![]() ![]() |
UnaryNegation |
Negates the value of the specified Decimal operand.
|
![]() ![]() |
UnaryPlus |
Returns the value of the Decimal operand (the sign of the operand is unchanged).
|
Fields
Name | Description | |
---|---|---|
![]() ![]() |
MaxValue |
Represents the largest possible value of Decimal. This field is constant and read-only.
|
![]() ![]() |
MinusOne |
Represents the number negative one (-1).
|
![]() ![]() |
MinValue |
Represents the smallest possible value of Decimal. This field is constant and read-only.
|
![]() ![]() |
One |
Represents the number one (1).
|
![]() ![]() |
Zero |
Represents the number zero (0).
|