Mono Class Library: System.Convert Overview | Members

System.Convert.ToDecimal Method

Converts a float to a decimal . [Edit]

public static decimal ToDecimal (float value)

Parameters

value
The float value to be converted. [Edit]

Returns

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

Exceptions

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

Remarks

Documentation for this section has not yet been entered. [Edit]

Requirements

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