Mono Class Library: System.Convert Overview | Members

System.Convert.ToDecimal Method

Converts a float to a decimal .

public static decimal ToDecimal (float value)

Parameters

value
The float value to be converted.

Returns

value as a decimal. The decimal contains 7 significant digits and is rounded using banker's rounding.

Exceptions

TypeReason
OverflowExceptionThe numeric value of value is greater than decimal.MaxValue or less than decimal.MinValue.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0