mscorlib(4.0.0.0) API with additions
|
Represents a decimal number. More...
Public Member Functions | |
Decimal (int value) | |
Initializes a new instance of T:System.Decimal to the value of the specified 32-bit signed integer. More... | |
Decimal (uint value) | |
Initializes a new instance of T:System.Decimal to the value of the specified 32-bit unsigned integer. More... | |
Decimal (long value) | |
Initializes a new instance of T:System.Decimal to the value of the specified 64-bit signed integer. More... | |
Decimal (ulong value) | |
Initializes a new instance of T:System.Decimal to the value of the specified 64-bit unsigned integer. More... | |
Decimal (float value) | |
Initializes a new instance of T:System.Decimal to the value of the specified single-precision floating-point number. More... | |
Decimal (double value) | |
Initializes a new instance of T:System.Decimal to the value of the specified double-precision floating-point number. More... | |
internal | Decimal (Currency value) |
Decimal (int[] bits) | |
Initializes a new instance of T:System.Decimal to a decimal value represented in binary and contained in a specified array. More... | |
Decimal (int lo, int mid, int hi, bool isNegative, byte scale) | |
Initializes a new instance of T:System.Decimal from parameters specifying the instance's constituent parts. More... | |
void IDeserializationCallback. | OnDeserialization (object sender) |
Runs when the deserialization of an object has been completed. More... | |
int | CompareTo (object value) |
Compares this instance to a specified object and returns a comparison of their relative values. More... | |
int | CompareTo (decimal value) |
Compares this instance to a specified T:System.Decimal object and returns a comparison of their relative values. More... | |
override bool | Equals (object value) |
Returns a value indicating whether this instance and a specified T:System.Object represent the same type and value. More... | |
bool | Equals (decimal value) |
Returns a value indicating whether this instance and a specified T:System.Decimal object represent the same value. More... | |
override int | GetHashCode () |
Returns the hash code for this instance. More... | |
override string | ToString () |
Converts the numeric value of this instance to its equivalent string representation. More... | |
string | ToString (string format) |
Converts the numeric value of this instance to its equivalent string representation, using the specified format. More... | |
string | ToString (IFormatProvider provider) |
Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information. More... | |
string | ToString (string format, IFormatProvider provider) |
Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information. More... | |
static double | ToDouble (decimal d) |
Converts the value of the specified T:System.Decimal to the equivalent double-precision floating-point number. More... | |
static internal int | FCallToInt32 (decimal d) |
static float | ToSingle (decimal d) |
Converts the value of the specified T:System.Decimal to the equivalent single-precision floating-point number. More... | |
TypeCode | GetTypeCode () |
Returns the T:System.TypeCode for value type T:System.Decimal. More... | |
bool IConvertible. | ToBoolean (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToBoolean(System.IFormatProvider). More... | |
char IConvertible. | ToChar (IFormatProvider provider) |
This conversion is not supported. Attempting to use this method throws an T:System.InvalidCastException. More... | |
sbyte IConvertible. | ToSByte (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToSByte(System.IFormatProvider). More... | |
byte IConvertible. | ToByte (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToByte(System.IFormatProvider). More... | |
short IConvertible. | ToInt16 (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToInt16(System.IFormatProvider). More... | |
ushort IConvertible. | ToUInt16 (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToUInt16(System.IFormatProvider). More... | |
int IConvertible. | ToInt32 (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToInt32(System.IFormatProvider). More... | |
uint IConvertible. | ToUInt32 (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToInt32(System.IFormatProvider). More... | |
long IConvertible. | ToInt64 (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToInt64(System.IFormatProvider). More... | |
ulong IConvertible. | ToUInt64 (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToInt64(System.IFormatProvider). More... | |
float IConvertible. | ToSingle (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToSingle(System.IFormatProvider). More... | |
double IConvertible. | ToDouble (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToDouble(System.IFormatProvider). More... | |
decimal IConvertible. | ToDecimal (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToDecimal(System.IFormatProvider). More... | |
DateTime IConvertible. | ToDateTime (IFormatProvider provider) |
This conversion is not supported. Attempting to use this method throws an T:System.InvalidCastException. More... | |
object IConvertible. | ToType (Type type, IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToType(System.Type,System.IFormatProvider). More... | |
![]() | |
bool | Equals (T other) |
Indicates whether the current object is equal to another object of the same type. More... | |
Static Public Member Functions | |
static long | ToOACurrency (decimal value) |
Converts the specified T:System.Decimal value to the equivalent OLE Automation Currency value, which is contained in a 64-bit signed integer. More... | |
static decimal | FromOACurrency (long cy) |
Converts the specified 64-bit signed integer, which contains an OLE Automation Currency value, to the equivalent T:System.Decimal value. More... | |
static internal decimal | Abs (decimal d) |
static decimal | Add (decimal d1, decimal d2) |
Adds two specified T:System.Decimal values. More... | |
static decimal | Ceiling (decimal d) |
Returns the smallest integral value that is greater than or equal to the specified decimal number. More... | |
static int | Compare (decimal d1, decimal d2) |
Compares two specified T:System.Decimal values. More... | |
static decimal | Divide (decimal d1, decimal d2) |
Divides two specified T:System.Decimal values. More... | |
static bool | Equals (decimal d1, decimal d2) |
Returns a value indicating whether two specified instances of T:System.Decimal represent the same value. More... | |
static decimal | Floor (decimal d) |
Rounds a specified T:System.Decimal number to the closest integer toward negative infinity. More... | |
static decimal | Parse (string s) |
Converts the string representation of a number to its T:System.Decimal equivalent. More... | |
static decimal | Parse (string s, NumberStyles style) |
Converts the string representation of a number in a specified style to its T:System.Decimal equivalent. More... | |
static decimal | Parse (string s, IFormatProvider provider) |
Converts the string representation of a number to its T:System.Decimal equivalent using the specified culture-specific format information. More... | |
static decimal | Parse (string s, NumberStyles style, IFormatProvider provider) |
Converts the string representation of a number to its T:System.Decimal equivalent using the specified style and culture-specific format. More... | |
static bool | TryParse (string s, out decimal result) |
Converts the string representation of a number to its T:System.Decimal equivalent. A return value indicates whether the conversion succeeded or failed. More... | |
static bool | TryParse (string s, NumberStyles style, IFormatProvider provider, out decimal result) |
Converts the string representation of a number to its T:System.Decimal equivalent using the specified style and culture-specific format. A return value indicates whether the conversion succeeded or failed. More... | |
static int [] | GetBits (decimal d) |
Converts the value of a specified instance of T:System.Decimal to its equivalent binary representation. More... | |
static internal void | GetBytes (decimal d, byte[] buffer) |
static internal decimal | ToDecimal (byte[] buffer) |
static internal decimal | Max (decimal d1, decimal d2) |
static internal decimal | Min (decimal d1, decimal d2) |
static decimal | Remainder (decimal d1, decimal d2) |
Computes the remainder after dividing two T:System.Decimal values. More... | |
static decimal | Multiply (decimal d1, decimal d2) |
Multiplies two specified T:System.Decimal values. More... | |
static decimal | Negate (decimal d) |
Returns the result of multiplying the specified T:System.Decimal value by negative one. More... | |
static decimal | Round (decimal d) |
Rounds a decimal value to the nearest integer. More... | |
static decimal | Round (decimal d, int decimals) |
Rounds a T:System.Decimal value to a specified number of decimal places. More... | |
static decimal | Round (decimal d, MidpointRounding mode) |
Rounds a decimal value to the nearest integer. A parameter specifies how to round the value if it is midway between two other numbers. More... | |
static decimal | Round (decimal d, int decimals, MidpointRounding mode) |
Rounds a decimal value to a specified precision. A parameter specifies how to round the value if it is midway between two other numbers. More... | |
static decimal | Subtract (decimal d1, decimal d2) |
Subtracts one specified T:System.Decimal value from another. More... | |
static byte | ToByte (decimal value) |
Converts the value of the specified T:System.Decimal to the equivalent 8-bit unsigned integer. More... | |
static sbyte | ToSByte (decimal value) |
Converts the value of the specified T:System.Decimal to the equivalent 8-bit signed integer. More... | |
static short | ToInt16 (decimal value) |
Converts the value of the specified T:System.Decimal to the equivalent 16-bit signed integer. More... | |
static internal Currency | ToCurrency (decimal d) |
static int | ToInt32 (decimal d) |
Converts the value of the specified T:System.Decimal to the equivalent 32-bit signed integer. More... | |
static long | ToInt64 (decimal d) |
Converts the value of the specified T:System.Decimal to the equivalent 64-bit signed integer. More... | |
static ushort | ToUInt16 (decimal value) |
Converts the value of the specified T:System.Decimal to the equivalent 16-bit unsigned integer. More... | |
static uint | ToUInt32 (decimal d) |
Converts the value of the specified T:System.Decimal to the equivalent 32-bit unsigned integer. More... | |
static ulong | ToUInt64 (decimal d) |
Converts the value of the specified T:System.Decimal to the equivalent 64-bit unsigned integer. More... | |
static decimal | Truncate (decimal d) |
Returns the integral digits of the specified T:System.Decimal; any fractional digits are discarded. More... | |
static implicit | operator decimal (byte value) |
Defines an implicit conversion of an 8-bit unsigned integer to a T:System.Decimal. More... | |
static implicit | operator decimal (sbyte value) |
Defines an implicit conversion of an 8-bit signed integer to a T:System.Decimal. More... | |
static implicit | operator decimal (short value) |
Defines an implicit conversion of a 16-bit signed integer to a T:System.Decimal. More... | |
static implicit | operator decimal (ushort value) |
Defines an implicit conversion of a 16-bit unsigned integer to a T:System.Decimal. More... | |
static implicit | operator decimal (char value) |
Defines an implicit conversion of a Unicode character to a T:System.Decimal. More... | |
static implicit | operator decimal (int value) |
Defines an implicit conversion of a 32-bit signed integer to a T:System.Decimal. More... | |
static implicit | operator decimal (uint value) |
Defines an implicit conversion of a 32-bit unsigned integer to a T:System.Decimal. More... | |
static implicit | operator decimal (long value) |
Defines an implicit conversion of a 64-bit signed integer to a T:System.Decimal. More... | |
static implicit | operator decimal (ulong value) |
Defines an implicit conversion of a 64-bit unsigned integer to a T:System.Decimal. More... | |
static | operator decimal (float value) |
Defines an explicit conversion of a single-precision floating-point number to a T:System.Decimal. More... | |
static | operator decimal (double value) |
Defines an explicit conversion of a double-precision floating-point number to a T:System.Decimal. More... | |
static | operator byte (decimal value) |
Defines an explicit conversion of a T:System.Decimal to an 8-bit unsigned integer. More... | |
static | operator sbyte (decimal value) |
Defines an explicit conversion of a T:System.Decimal to an 8-bit signed integer. More... | |
static | operator char (decimal value) |
Defines an explicit conversion of a T:System.Decimal to a Unicode character. More... | |
static | operator short (decimal value) |
Defines an explicit conversion of a T:System.Decimal to a 16-bit signed integer. More... | |
static | operator ushort (decimal value) |
Defines an explicit conversion of a T:System.Decimal to a 16-bit unsigned integer. More... | |
static | operator int (decimal value) |
Defines an explicit conversion of a T:System.Decimal to a 32-bit signed integer. More... | |
static | operator uint (decimal value) |
Defines an explicit conversion of a T:System.Decimal to a 32-bit unsigned integer. More... | |
static | operator long (decimal value) |
Defines an explicit conversion of a T:System.Decimal to a 64-bit signed integer. More... | |
static | operator ulong (decimal value) |
Defines an explicit conversion of a T:System.Decimal to a 64-bit unsigned integer. More... | |
static | operator float (decimal value) |
Defines an explicit conversion of a T:System.Decimal to a single-precision floating-point number. More... | |
static | operator double (decimal value) |
Defines an explicit conversion of a T:System.Decimal to a double-precision floating-point number. More... | |
static decimal | operator+ (decimal d) |
Returns the value of the T:System.Decimal operand (the sign of the operand is unchanged). More... | |
static decimal | operator - (decimal d) |
Negates the value of the specified T:System.Decimal operand. More... | |
static decimal | operator++ (decimal d) |
Increments the T:System.Decimal operand by 1. More... | |
static decimal | operator -- (decimal d) |
Decrements the T:System.Decimal operand by one. More... | |
static decimal | operator+ (decimal d1, decimal d2) |
Adds two specified T:System.Decimal values. More... | |
static decimal | operator - (decimal d1, decimal d2) |
Subtracts two specified T:System.Decimal values. More... | |
static decimal | operator * (decimal d1, decimal d2) |
Multiplies two specified T:System.Decimal values. More... | |
static decimal | operator/ (decimal d1, decimal d2) |
Divides two specified T:System.Decimal values. More... | |
static decimal | operator % (decimal d1, decimal d2) |
Returns the remainder resulting from dividing two specified T:System.Decimal values. More... | |
static bool | operator== (decimal d1, decimal d2) |
Returns a value that indicates whether two T:System.Decimal values are equal. More... | |
static bool | operator != (decimal d1, decimal d2) |
Returns a value that indicates whether two T:System.Decimal objects have different values. More... | |
static bool | operator< (decimal d1, decimal d2) |
Returns a value indicating whether a specified T:System.Decimal is less than another specified T:System.Decimal. More... | |
static bool | operator<= (decimal d1, decimal d2) |
Returns a value indicating whether a specified T:System.Decimal is less than or equal to another specified T:System.Decimal. More... | |
static bool | operator > (decimal d1, decimal d2) |
Returns a value indicating whether a specified T:System.Decimal is greater than another specified T:System.Decimal. More... | |
static bool | operator >= (decimal d1, decimal d2) |
Returns a value indicating whether a specified T:System.Decimal is greater than or equal to another specified T:System.Decimal. More... | |
Public Attributes | |
const decimal | Zero = 0m |
Represents the number zero (0). More... | |
const decimal | One = 1m |
Represents the number one (1). More... | |
const decimal | MinusOne = -1m |
Represents the number negative one (-1). More... | |
const decimal | MaxValue = decimal.MaxValue |
Represents the largest possible value of T:System.Decimal. This field is constant and read-only. More... | |
const decimal | MinValue = decimal.MinValue |
Represents the smallest possible value of T:System.Decimal. This field is constant and read-only. More... | |
Represents a decimal number.
Definition at line 16 of file Decimal.cs.
System.Decimal.Decimal | ( | int | value | ) |
Initializes a new instance of T:System.Decimal to the value of the specified 32-bit signed integer.
value | The value to represent as a T:System.Decimal. |
Definition at line 79 of file Decimal.cs.
System.Decimal.Decimal | ( | uint | value | ) |
Initializes a new instance of T:System.Decimal to the value of the specified 32-bit unsigned integer.
value | The value to represent as a T:System.Decimal. |
Definition at line 100 of file Decimal.cs.
System.Decimal.Decimal | ( | long | value | ) |
Initializes a new instance of T:System.Decimal to the value of the specified 64-bit signed integer.
value | The value to represent as a T:System.Decimal. |
Definition at line 111 of file Decimal.cs.
System.Decimal.Decimal | ( | ulong | value | ) |
Initializes a new instance of T:System.Decimal to the value of the specified 64-bit unsigned integer.
value | The value to represent as a T:System.Decimal. |
Definition at line 132 of file Decimal.cs.
System.Decimal.Decimal | ( | float | value | ) |
Initializes a new instance of T:System.Decimal to the value of the specified single-precision floating-point number.
value | The value to represent as a T:System.Decimal. |
T:System.OverflowException | value is greater than F:System.Decimal.MaxValue or less than F:System.Decimal.MinValue.-or- value is F:System.Single.NaN, F:System.Single.PositiveInfinity, or F:System.Single.NegativeInfinity. |
System.Decimal.Decimal | ( | double | value | ) |
Initializes a new instance of T:System.Decimal to the value of the specified double-precision floating-point number.
value | The value to represent as a T:System.Decimal. |
T:System.OverflowException | value is greater than F:System.Decimal.MaxValue or less than F:System.Decimal.MinValue.-or- value is F:System.Double.NaN, F:System.Double.PositiveInfinity, or F:System.Double.NegativeInfinity. |
System.Decimal.Decimal | ( | int [] | bits | ) |
Initializes a new instance of T:System.Decimal to a decimal value represented in binary and contained in a specified array.
bits | An array of 32-bit signed integers containing a representation of a decimal value. |
T:System.ArgumentNullException | bits is null . |
T:System.ArgumentException | The length of the bits is not 4.-or- The representation of the decimal value in bits is not valid. |
Definition at line 193 of file Decimal.cs.
System.Decimal.Decimal | ( | int | lo, |
int | mid, | ||
int | hi, | ||
bool | isNegative, | ||
byte | scale | ||
) |
Initializes a new instance of T:System.Decimal from parameters specifying the instance's constituent parts.
lo | The low 32 bits of a 96-bit integer. |
mid | The middle 32 bits of a 96-bit integer. |
hi | The high 32 bits of a 96-bit integer. |
isNegative | true to indicate a negative number; false to indicate a positive number. |
scale | A power of 10 ranging from 0 to 28. |
T:System.ArgumentOutOfRangeException | scale is greater than 28. |
Definition at line 233 of file Decimal.cs.
|
static |
Adds two specified T:System.Decimal values.
d1 | The first value to add. |
d2 | The second value to add. |
T:System.OverflowException | The sum of d1 and d2 is less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue. |
Definition at line 302 of file Decimal.cs.
|
static |
Returns the smallest integral value that is greater than or equal to the specified decimal number.
d | A decimal number. |
Definition at line 320 of file Decimal.cs.
|
static |
Compares two specified T:System.Decimal values.
d1 | The first value to compare. |
d2 | The second value to compare. |
Definition at line 335 of file Decimal.cs.
int System.Decimal.CompareTo | ( | object | value | ) |
Compares this instance to a specified object and returns a comparison of their relative values.
value | The object to compare with this instance, or null . |
null
. T:System.ArgumentException | value is not a T:System.Decimal. |
Definition at line 352 of file Decimal.cs.
int System.Decimal.CompareTo | ( | decimal | value | ) |
Compares this instance to a specified T:System.Decimal object and returns a comparison of their relative values.
value | The object to compare with this instance. |
Definition at line 371 of file Decimal.cs.
|
static |
Divides two specified T:System.Decimal values.
d1 | The dividend. |
d2 | The divisor. |
T:System.DivideByZeroException | d2 is zero. |
T:System.OverflowException | The return value (that is, the quotient) is less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue. |
Definition at line 385 of file Decimal.cs.
override bool System.Decimal.Equals | ( | object | value | ) |
Returns a value indicating whether this instance and a specified T:System.Object represent the same type and value.
value | The object to compare with this instance. |
true
if value is a T:System.Decimal and equal to this instance; otherwise, false
.Definition at line 405 of file Decimal.cs.
bool System.Decimal.Equals | ( | decimal | value | ) |
Returns a value indicating whether this instance and a specified T:System.Decimal object represent the same value.
value | An object to compare to this instance. |
true
if value is equal to this instance; otherwise, false
.Definition at line 421 of file Decimal.cs.
|
static |
Returns a value indicating whether two specified instances of T:System.Decimal represent the same value.
d1 | The first value to compare. |
d2 | The second value to compare. |
true
if d1 and d2 are equal; otherwise, false
.Definition at line 440 of file Decimal.cs.
|
static |
Rounds a specified T:System.Decimal number to the closest integer toward negative infinity.
d | The value to round. |
Definition at line 450 of file Decimal.cs.
|
static |
Converts the specified 64-bit signed integer, which contains an OLE Automation Currency value, to the equivalent T:System.Decimal value.
cy | An OLE Automation Currency value. |
Definition at line 182 of file Decimal.cs.
|
static |
Converts the value of a specified instance of T:System.Decimal to its equivalent binary representation.
d | The value to convert. |
Definition at line 608 of file Decimal.cs.
override int System.Decimal.GetHashCode | ( | ) |
Returns the hash code for this instance.
TypeCode System.Decimal.GetTypeCode | ( | ) |
Returns the T:System.TypeCode for value type T:System.Decimal.
Implements System.IConvertible.
Definition at line 1564 of file Decimal.cs.
|
static |
Multiplies two specified T:System.Decimal values.
d1 | The multiplicand. |
d2 | The multiplier. |
T:System.OverflowException | The return value is less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue. |
Definition at line 777 of file Decimal.cs.
|
static |
Returns the result of multiplying the specified T:System.Decimal value by negative one.
d | The value to negate. |
Definition at line 795 of file Decimal.cs.
void IDeserializationCallback. System.Decimal.OnDeserialization | ( | object | sender | ) |
Runs when the deserialization of an object has been completed.
sender | The object that initiated the callback. The functionality for this parameter is not currently implemented. |
T:System.Runtime.Serialization.SerializationException | The T:System.Decimal object contains invalid or corrupted data. |
Implements System.Runtime.Serialization.IDeserializationCallback.
Definition at line 265 of file Decimal.cs.
|
static |
Returns a value that indicates whether two T:System.Decimal objects have different values.
d1 | The first value to compare. |
d2 | The second value to compare. |
true
if d1 and d2 are not equal; otherwise, false
.Definition at line 1509 of file Decimal.cs.
|
static |
Returns the remainder resulting from dividing two specified T:System.Decimal values.
d1 | The dividend. |
d2 | The divisor. |
T:System.DivideByZeroException | d2 is zero . |
T:System.OverflowException | The return value is less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue. |
Definition at line 1485 of file Decimal.cs.
|
static |
Multiplies two specified T:System.Decimal values.
d1 | The first value to multiply. |
d2 | The second value to multiply. |
T:System.OverflowException | The return value is less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue. |
Definition at line 1456 of file Decimal.cs.
|
static |
Negates the value of the specified T:System.Decimal operand.
d | The value to negate. |
Definition at line 1398 of file Decimal.cs.
|
static |
Subtracts two specified T:System.Decimal values.
d1 | The minuend. |
d2 | The subtrahend. |
T:System.OverflowException | The return value is less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue. |
Definition at line 1443 of file Decimal.cs.
|
static |
Decrements the T:System.Decimal operand by one.
d | The value to decrement. |
T:System.OverflowException | The return value is less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue. |
Definition at line 1418 of file Decimal.cs.
|
static |
Returns a value indicating whether a specified T:System.Decimal is greater than another specified T:System.Decimal.
d1 | The first value to compare. |
d2 | The second value to compare. |
true
if d1 is greater than d2 ; otherwise, false
.Definition at line 1545 of file Decimal.cs.
|
static |
Returns a value indicating whether a specified T:System.Decimal is greater than or equal to another specified T:System.Decimal.
d1 | The first value to compare. |
d2 | The second value to compare. |
true
if d1 is greater than or equal to d2 ; otherwise, false
.Definition at line 1557 of file Decimal.cs.
|
explicitstatic |
Defines an explicit conversion of a T:System.Decimal to an 8-bit unsigned integer.
value | The value to convert. |
T:System.OverflowException | value is less than F:System.Byte.MinValue or greater than F:System.Byte.MaxValue. |
Definition at line 1263 of file Decimal.cs.
|
explicitstatic |
Defines an explicit conversion of a T:System.Decimal to a Unicode character.
value | The value to convert. |
T:System.OverflowException | value is less than F:System.Char.MinValue or greater than F:System.Char.MaxValue. |
Definition at line 1286 of file Decimal.cs.
|
static |
Defines an implicit conversion of an 8-bit unsigned integer to a T:System.Decimal.
value | The 8-bit unsigned integer to convert. |
Definition at line 1152 of file Decimal.cs.
|
static |
Defines an implicit conversion of an 8-bit signed integer to a T:System.Decimal.
value | The 8-bit signed integer to convert. |
Definition at line 1162 of file Decimal.cs.
|
static |
Defines an implicit conversion of a 16-bit signed integer to a T:System.Decimal.
value | The16-bit signed integer to convert. |
Definition at line 1171 of file Decimal.cs.
|
static |
Defines an implicit conversion of a 16-bit unsigned integer to a T:System.Decimal.
value | The 16-bit unsigned integer to convert. |
Definition at line 1181 of file Decimal.cs.
|
static |
Defines an implicit conversion of a Unicode character to a T:System.Decimal.
value | The Unicode character to convert. |
Definition at line 1190 of file Decimal.cs.
|
static |
Defines an implicit conversion of a 32-bit signed integer to a T:System.Decimal.
value | The 32-bit signed integer to convert. |
Definition at line 1199 of file Decimal.cs.
|
static |
Defines an implicit conversion of a 32-bit unsigned integer to a T:System.Decimal.
value | The 32-bit unsigned integer to convert. |
Definition at line 1209 of file Decimal.cs.
|
static |
Defines an implicit conversion of a 64-bit signed integer to a T:System.Decimal.
value | The 64-bit signed integer to convert. |
Definition at line 1218 of file Decimal.cs.
|
static |
Defines an implicit conversion of a 64-bit unsigned integer to a T:System.Decimal.
value | The 64-bit unsigned integer to convert. |
Definition at line 1228 of file Decimal.cs.
|
explicitstatic |
Defines an explicit conversion of a single-precision floating-point number to a T:System.Decimal.
value | The single-precision floating-point number to convert. |
T:System.OverflowException | value is less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue.-or- value is F:System.Single.NaN, F:System.Single.PositiveInfinity, or F:System.Single.NegativeInfinity. |
Definition at line 1240 of file Decimal.cs.
|
explicitstatic |
Defines an explicit conversion of a double-precision floating-point number to a T:System.Decimal.
value | The double-precision floating-point number to convert. |
T:System.OverflowException | value is less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue.-or- value is F:System.Double.NaN, F:System.Double.PositiveInfinity, or F:System.Double.NegativeInfinity. |
Definition at line 1252 of file Decimal.cs.
|
explicitstatic |
Defines an explicit conversion of a T:System.Decimal to a double-precision floating-point number.
value | The value to convert. |
Definition at line 1380 of file Decimal.cs.
|
explicitstatic |
Defines an explicit conversion of a T:System.Decimal to a single-precision floating-point number.
value | The value to convert. |
Definition at line 1371 of file Decimal.cs.
|
explicitstatic |
Defines an explicit conversion of a T:System.Decimal to a 32-bit signed integer.
value | The value to convert. |
T:System.OverflowException | value is less than F:System.Int32.MinValue or greater than F:System.Int32.MaxValue. |
Definition at line 1327 of file Decimal.cs.
|
explicitstatic |
Defines an explicit conversion of a T:System.Decimal to a 64-bit signed integer.
value | The value to convert. |
T:System.OverflowException | value is less than F:System.Int64.MinValue or greater than F:System.Int64.MaxValue. |
Definition at line 1350 of file Decimal.cs.
|
explicitstatic |
Defines an explicit conversion of a T:System.Decimal to an 8-bit signed integer.
value | The value to convert. |
T:System.OverflowException | value is less than F:System.SByte.MinValue or greater than F:System.SByte.MaxValue. |
Definition at line 1275 of file Decimal.cs.
|
explicitstatic |
Defines an explicit conversion of a T:System.Decimal to a 16-bit signed integer.
value | The value to convert. |
T:System.OverflowException | value is less than F:System.Int16.MinValue or greater than F:System.Int16.MaxValue. |
Definition at line 1304 of file Decimal.cs.
|
explicitstatic |
Defines an explicit conversion of a T:System.Decimal to a 32-bit unsigned integer.
value | The value to convert. |
T:System.OverflowException | value is negative or greater than F:System.UInt32.MaxValue. |
Definition at line 1339 of file Decimal.cs.
|
explicitstatic |
Defines an explicit conversion of a T:System.Decimal to a 64-bit unsigned integer.
value | The value to convert. |
T:System.OverflowException | value is negative or greater than F:System.UInt64.MaxValue. |
Definition at line 1362 of file Decimal.cs.
|
explicitstatic |
Defines an explicit conversion of a T:System.Decimal to a 16-bit unsigned integer.
value | The value to convert. |
T:System.OverflowException | value is greater than F:System.UInt16.MaxValue or less than F:System.UInt16.MinValue. |
Definition at line 1316 of file Decimal.cs.
|
static |
Returns the value of the T:System.Decimal operand (the sign of the operand is unchanged).
d | The operand to return. |
Definition at line 1389 of file Decimal.cs.
|
static |
Adds two specified T:System.Decimal values.
d1 | The first value to add. |
d2 | The second value to add. |
T:System.OverflowException | The return value is less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue. |
Definition at line 1430 of file Decimal.cs.
|
static |
Increments the T:System.Decimal operand by 1.
d | The value to increment. |
T:System.OverflowException | The return value is less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue. |
Definition at line 1408 of file Decimal.cs.
|
static |
Divides two specified T:System.Decimal values.
d1 | The dividend. |
d2 | The divisor. |
T:System.DivideByZeroException | d2 is zero. |
T:System.OverflowException | The return value is less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue. |
Definition at line 1471 of file Decimal.cs.
|
static |
Returns a value indicating whether a specified T:System.Decimal is less than another specified T:System.Decimal.
d1 | The first value to compare. |
d2 | The second value to compare. |
true
if d1 is less than d2 ; otherwise, false
.Definition at line 1521 of file Decimal.cs.
|
static |
Returns a value indicating whether a specified T:System.Decimal is less than or equal to another specified T:System.Decimal.
d1 | The first value to compare. |
d2 | The second value to compare. |
true
if d1 is less than or equal to d2 ; otherwise, false
.Definition at line 1533 of file Decimal.cs.
|
static |
Returns a value that indicates whether two T:System.Decimal values are equal.
d1 | The first value to compare. |
d2 | The second value to compare. |
true
if d1 and d2 are equal; otherwise, false
.Definition at line 1497 of file Decimal.cs.
|
static |
Converts the string representation of a number to its T:System.Decimal equivalent.
s | The string representation of the number to convert. |
T:System.ArgumentNullException | s is null . |
T:System.FormatException | s is not in the correct format. |
T:System.OverflowException | s represents a number less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue. |
Definition at line 514 of file Decimal.cs.
|
static |
Converts the string representation of a number in a specified style to its T:System.Decimal equivalent.
s | The string representation of the number to convert. |
style | A bitwise combination of T:System.Globalization.NumberStyles values that indicates the style elements that can be present in s . A typical value to specify is F:System.Globalization.NumberStyles.Number. |
T:System.ArgumentNullException | s is null . |
T:System.ArgumentException | style is not a T:System.Globalization.NumberStyles value. -or- style is the F:System.Globalization.NumberStyles.AllowHexSpecifier value. |
T:System.FormatException | s is not in the correct format. |
T:System.OverflowException | s represents a number less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue |
Definition at line 533 of file Decimal.cs.
|
static |
Converts the string representation of a number to its T:System.Decimal equivalent using the specified culture-specific format information.
s | The string representation of the number to convert. |
provider | An T:System.IFormatProvider that supplies culture-specific parsing information about s . |
T:System.ArgumentNullException | s is null . |
T:System.FormatException | s is not of the correct format |
T:System.OverflowException | s represents a number less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue |
Definition at line 550 of file Decimal.cs.
|
static |
Converts the string representation of a number to its T:System.Decimal equivalent using the specified style and culture-specific format.
s | The string representation of the number to convert. |
style | A bitwise combination of T:System.Globalization.NumberStyles values that indicates the style elements that can be present in s . A typical value to specify is F:System.Globalization.NumberStyles.Number. |
provider | An T:System.IFormatProvider object that supplies culture-specific information about the format of s . |
T:System.FormatException | s is not in the correct format. |
T:System.OverflowException | s represents a number less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue. |
T:System.ArgumentNullException | s is null . |
T:System.ArgumentException | style is not a T:System.Globalization.NumberStyles value. -or- style is the F:System.Globalization.NumberStyles.AllowHexSpecifier value. |
Definition at line 570 of file Decimal.cs.
|
static |
Computes the remainder after dividing two T:System.Decimal values.
d1 | The dividend. |
d2 | The divisor. |
T:System.DivideByZeroException | d2 is zero. |
T:System.OverflowException | The return value is less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue. |
Definition at line 741 of file Decimal.cs.
|
static |
Rounds a decimal value to the nearest integer.
d | A decimal number to round. |
T:System.OverflowException | The result is outside the range of a T:System.Decimal value. |
Definition at line 804 of file Decimal.cs.
|
static |
Rounds a T:System.Decimal value to a specified number of decimal places.
d | A decimal number to round. |
decimals | A value from 0 to 28 that specifies the number of decimal places to round to. |
T:System.ArgumentOutOfRangeException | decimals is not a value from 0 to 28. |
Definition at line 817 of file Decimal.cs.
|
static |
Rounds a decimal value to the nearest integer. A parameter specifies how to round the value if it is midway between two other numbers.
d | A decimal number to round. |
mode | A value that specifies how to round d if it is midway between two other numbers. |
T:System.ArgumentException | mode is not a T:System.MidpointRounding value. |
T:System.OverflowException | The result is outside the range of a T:System.Decimal object. |
Definition at line 830 of file Decimal.cs.
|
static |
Rounds a decimal value to a specified precision. A parameter specifies how to round the value if it is midway between two other numbers.
d | A decimal number to round. |
decimals | The number of significant decimal places (precision) in the return value. |
mode | A value that specifies how to round d if it is midway between two other numbers. |
T:System.ArgumentOutOfRangeException | decimals is less than 0 or greater than 28. |
T:System.ArgumentException | mode is not a T:System.MidpointRounding value. |
T:System.OverflowException | The result is outside the range of a T:System.Decimal object. |
Definition at line 846 of file Decimal.cs.
|
static |
Subtracts one specified T:System.Decimal value from another.
d1 | The minuend. |
d2 | The subtrahend. |
T:System.OverflowException | The return value is less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue. |
Definition at line 877 of file Decimal.cs.
bool IConvertible. System.Decimal.ToBoolean | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToBoolean(System.IFormatProvider).
provider | This parameter is ignored. |
true
if the value of the current instance is not zero; otherwise, false
.Implements System.IConvertible.
Definition at line 1574 of file Decimal.cs.
|
static |
Converts the value of the specified T:System.Decimal to the equivalent 8-bit unsigned integer.
value | The decimal number to convert. |
T:System.OverflowException | value is less than F:System.Byte.MinValue or greater than F:System.Byte.MaxValue. |
Definition at line 889 of file Decimal.cs.
byte IConvertible. System.Decimal.ToByte | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToByte(System.IFormatProvider).
provider | This parameter is ignored. |
T:System.OverflowException | The resulting integer value is less than F:System.Byte.MinValue or greater than F:System.Byte.MaxValue. |
Implements System.IConvertible.
Definition at line 1604 of file Decimal.cs.
char IConvertible. System.Decimal.ToChar | ( | IFormatProvider | provider | ) |
This conversion is not supported. Attempting to use this method throws an T:System.InvalidCastException.
provider | This parameter is ignored. |
T:System.InvalidCastException | In all cases. |
Implements System.IConvertible.
Definition at line 1584 of file Decimal.cs.
DateTime IConvertible. System.Decimal.ToDateTime | ( | IFormatProvider | provider | ) |
This conversion is not supported. Attempting to use this method throws an T:System.InvalidCastException.
provider | This parameter is ignored. |
T:System.InvalidCastException | In all cases. |
Implements System.IConvertible.
Definition at line 1701 of file Decimal.cs.
decimal IConvertible. System.Decimal.ToDecimal | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToDecimal(System.IFormatProvider).
provider | This parameter is ignored. |
Implements System.IConvertible.
Definition at line 1691 of file Decimal.cs.
static double System.Decimal.ToDouble | ( | decimal | d | ) |
Converts the value of the specified T:System.Decimal to the equivalent double-precision floating-point number.
d | The decimal number to convert. |
double IConvertible. System.Decimal.ToDouble | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToDouble(System.IFormatProvider).
provider | This parameter is ignored. |
Implements System.IConvertible.
Definition at line 1682 of file Decimal.cs.
|
static |
Converts the value of the specified T:System.Decimal to the equivalent 16-bit signed integer.
value | The decimal number to convert. |
T:System.OverflowException | value is less than F:System.Int16.MinValue or greater than F:System.Int16.MaxValue. |
Definition at line 938 of file Decimal.cs.
short IConvertible. System.Decimal.ToInt16 | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToInt16(System.IFormatProvider).
provider | This parameter is ignored. |
T:System.OverflowException | The resulting integer value is less than F:System.Int16.MinValue or greater than F:System.Int16.MaxValue. |
Implements System.IConvertible.
Definition at line 1614 of file Decimal.cs.
|
static |
Converts the value of the specified T:System.Decimal to the equivalent 32-bit signed integer.
d | The decimal number to convert. |
T:System.OverflowException | d is less than F:System.Int32.MinValue or greater than F:System.Int32.MaxValue. |
Definition at line 987 of file Decimal.cs.
int IConvertible. System.Decimal.ToInt32 | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToInt32(System.IFormatProvider).
provider | The parameter is ignored. |
T:System.OverflowException | The resulting integer value is less than F:System.Int32.MinValue or greater than F:System.Int32.MaxValue. |
Implements System.IConvertible.
Definition at line 1634 of file Decimal.cs.
|
static |
Converts the value of the specified T:System.Decimal to the equivalent 64-bit signed integer.
d | The decimal number to convert. |
T:System.OverflowException | d is less than F:System.Int64.MinValue or greater than F:System.Int64.MaxValue. |
Definition at line 1022 of file Decimal.cs.
long IConvertible. System.Decimal.ToInt64 | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToInt64(System.IFormatProvider).
provider | This parameter is ignored. |
T:System.OverflowException | The resulting integer value is less than F:System.Int64.MinValue or greater than F:System.Int64.MaxValue. |
Implements System.IConvertible.
Definition at line 1654 of file Decimal.cs.
|
static |
Converts the specified T:System.Decimal value to the equivalent OLE Automation Currency value, which is contained in a 64-bit signed integer.
value | The decimal number to convert. |
Definition at line 173 of file Decimal.cs.
|
static |
Converts the value of the specified T:System.Decimal to the equivalent 8-bit signed integer.
value | The decimal number to convert. |
T:System.OverflowException | value is less than F:System.SByte.MinValue or greater than F:System.SByte.MaxValue. |
Definition at line 914 of file Decimal.cs.
sbyte IConvertible. System.Decimal.ToSByte | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToSByte(System.IFormatProvider).
provider | This parameter is ignored. |
T:System.OverflowException | The resulting integer value is less than F:System.SByte.MinValue or greater than F:System.SByte.MaxValue. |
Implements System.IConvertible.
Definition at line 1594 of file Decimal.cs.
static float System.Decimal.ToSingle | ( | decimal | d | ) |
Converts the value of the specified T:System.Decimal to the equivalent single-precision floating-point number.
d | The decimal number to convert. |
float IConvertible. System.Decimal.ToSingle | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToSingle(System.IFormatProvider).
provider | This parameter is ignored. |
Implements System.IConvertible.
Definition at line 1673 of file Decimal.cs.
override string System.Decimal.ToString | ( | ) |
Converts the numeric value of this instance to its equivalent string representation.
Definition at line 464 of file Decimal.cs.
string System.Decimal.ToString | ( | string | format | ) |
Converts the numeric value of this instance to its equivalent string representation, using the specified format.
format | A standard or custom numeric format string (see Remarks). |
T:System.FormatException | format is invalid. |
Definition at line 476 of file Decimal.cs.
string System.Decimal.ToString | ( | IFormatProvider | provider | ) |
Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information.
provider | An object that supplies culture-specific formatting information. |
Implements System.IConvertible.
Definition at line 486 of file Decimal.cs.
string System.Decimal.ToString | ( | string | format, |
IFormatProvider | provider | ||
) |
Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information.
format | A numeric format string (see Remarks). |
provider | An object that supplies culture-specific formatting information. |
T:System.FormatException | format is invalid. |
Implements System.IFormattable.
Definition at line 499 of file Decimal.cs.
object IConvertible. System.Decimal.ToType | ( | Type | type, |
IFormatProvider | provider | ||
) |
For a description of this member, see M:System.IConvertible.ToType(System.Type,System.IFormatProvider).
type | The type to which to convert the value of this T:System.Decimal instance. |
provider | An T:System.IFormatProvider implementation that supplies culture-specific information about the format of the returned value. |
T:System.ArgumentNullException | type is null . |
T:System.InvalidCastException | The requested type conversion is not supported. |
Implements System.IConvertible.
Definition at line 1714 of file Decimal.cs.
|
static |
Converts the value of the specified T:System.Decimal to the equivalent 16-bit unsigned integer.
value | The decimal number to convert. |
T:System.OverflowException | value is greater than F:System.UInt16.MaxValue or less than F:System.UInt16.MinValue. |
Definition at line 1057 of file Decimal.cs.
ushort IConvertible. System.Decimal.ToUInt16 | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToUInt16(System.IFormatProvider).
provider | This parameter is ignored. |
T:System.OverflowException | The resulting integer value is less than F:System.UInt16.MinValue or greater than F:System.UInt16.MaxValue. |
Implements System.IConvertible.
Definition at line 1624 of file Decimal.cs.
|
static |
Converts the value of the specified T:System.Decimal to the equivalent 32-bit unsigned integer.
d | The decimal number to convert. |
T:System.OverflowException | d is negative or greater than F:System.UInt32.MaxValue. |
Definition at line 1083 of file Decimal.cs.
uint IConvertible. System.Decimal.ToUInt32 | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToInt32(System.IFormatProvider).
provider | This parameter is ignored. |
T:System.OverflowException | The resulting integer value is less than F:System.UInt32.MinValue or greater than F:System.UInt32.MaxValue. |
Implements System.IConvertible.
Definition at line 1644 of file Decimal.cs.
|
static |
Converts the value of the specified T:System.Decimal to the equivalent 64-bit unsigned integer.
d | The decimal number to convert. |
T:System.OverflowException | d is negative or greater than F:System.UInt64.MaxValue. |
Definition at line 1108 of file Decimal.cs.
ulong IConvertible. System.Decimal.ToUInt64 | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToInt64(System.IFormatProvider).
provider | This parameter is ignored. |
T:System.OverflowException | The resulting integer value is less than F:System.UInt64.MinValue or greater than F:System.UInt64.MaxValue. |
Implements System.IConvertible.
Definition at line 1664 of file Decimal.cs.
|
static |
Returns the integral digits of the specified T:System.Decimal; any fractional digits are discarded.
d | The decimal number to truncate. |
Definition at line 1138 of file Decimal.cs.
|
static |
Converts the string representation of a number to its T:System.Decimal equivalent. A return value indicates whether the conversion succeeded or failed.
s | The string representation of the number to convert. |
result | When this method returns, contains the T:System.Decimal number that is equivalent to the numeric value contained in s , if the conversion succeeded, or is zero if the conversion failed. The conversion fails if the s parameter is null or F:System.String.Empty, is not a number in a valid format, or represents a number less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue. This parameter is passed uninitialized; any value originally supplied in result will be overwritten. |
true
if s was converted successfully; otherwise, false
.Definition at line 582 of file Decimal.cs.
|
static |
Converts the string representation of a number to its T:System.Decimal equivalent using the specified style and culture-specific format. A return value indicates whether the conversion succeeded or failed.
s | The string representation of the number to convert. |
style | A bitwise combination of enumeration values that indicates the permitted format of s . A typical value to specify is F:System.Globalization.NumberStyles.Number. |
provider | An object that supplies culture-specific parsing information about s . |
result | When this method returns, contains the T:System.Decimal number that is equivalent to the numeric value contained in s , if the conversion succeeded, or is zero if the conversion failed. The conversion fails if the s parameter is null or F:System.String.Empty, is not in a format compliant with style , or represents a number less than F:System.Decimal.MinValue or greater than F:System.Decimal.MaxValue. This parameter is passed uninitialized; any value originally supplied in result will be overwritten. |
true
if s was converted successfully; otherwise, false
.T:System.ArgumentException | style is not a T:System.Globalization.NumberStyles value. -or- style is the F:System.Globalization.NumberStyles.AllowHexSpecifier value. |
Definition at line 598 of file Decimal.cs.
const decimal System.Decimal.MaxValue = decimal.MaxValue |
Represents the largest possible value of T:System.Decimal. This field is constant and read-only.
Definition at line 58 of file Decimal.cs.
const decimal System.Decimal.MinusOne = -1m |
Represents the number negative one (-1).
Definition at line 54 of file Decimal.cs.
const decimal System.Decimal.MinValue = decimal.MinValue |
Represents the smallest possible value of T:System.Decimal. This field is constant and read-only.
Definition at line 62 of file Decimal.cs.
const decimal System.Decimal.One = 1m |
Represents the number one (1).
Definition at line 50 of file Decimal.cs.
const decimal System.Decimal.Zero = 0m |
Represents the number zero (0).
Definition at line 46 of file Decimal.cs.