This topic has not yet been rated - Rate this topic

Convert.ToDecimal Method

April 12, 2014

Converts a specified value to a Decimal number.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  NameDescription
Public method Static member ToDecimal(Boolean) Converts the value of the specified Boolean value to the equivalent Decimal number.
Public method Static member ToDecimal(Byte) Converts the value of the specified 8-bit unsigned integer to the equivalent Decimal number.
Public method Static member ToDecimal(Char) Calling this method always throws InvalidCastException.
Public method Static member ToDecimal(DateTime) Calling this method always throws InvalidCastException.
Public method Static member ToDecimal(Decimal) Returns the specified Decimal number; no actual conversion is performed.
Public method Static member ToDecimal(Double) Converts the value of the specified double-precision floating point number to an equivalent Decimal number.
Public method Static member ToDecimal(Int16) Converts the value of the specified 16-bit signed integer to an equivalent Decimal number.
Public method Static member ToDecimal(Int32) Converts the value of the specified 32-bit signed integer to an equivalent Decimal number.
Public method Static member ToDecimal(Int64) Converts the value of the specified 64-bit signed integer to an equivalent Decimal number.
Public method Static member ToDecimal(Object) Converts the value of the specified Object to a Decimal number.
Public method Static member ToDecimal(SByte) Converts the value of the specified 8-bit signed integer to the equivalent Decimal number.
Public method Static member ToDecimal(Single) Converts the value of the specified single-precision floating point number to the equivalent Decimal number.
Public method Static member ToDecimal(String) Converts the specified String representation of a number to an equivalent Decimal number.
Public method Static member ToDecimal(UInt16) Converts the value of the specified 16-bit unsigned integer to the equivalent Decimal number.
Public method Static member ToDecimal(UInt32) Converts the value of the specified 32-bit unsigned integer to an equivalent Decimal number.
Public method Static member ToDecimal(UInt64) Converts the value of the specified 64-bit unsigned integer to an equivalent Decimal number.
Public method Static member ToDecimal(Object, IFormatProvider) Converts the value of the specified Object to an Decimal number using the specified culture-specific formatting information.
Public method Static member ToDecimal(String, IFormatProvider) Converts the specified String representation of a number to an equivalent Decimal number using the specified culture-specific formatting information.
Top

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.