NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Decimal.ToSingle (Decimal)

Converts a Decimal to a Single with a specified format.

[Visual Basic]
Overloads Public Shared Function ToSingle( _
   ByVal d As Decimal _
) As Single
[C#]
public static float ToSingle(
   Decimal d
);
[C++]
public: static float ToSingle(
   Decimal d
);
[JScript]
public static function ToSingle(
   d : Decimal
) : float;

Parameters

d
The Decimal value to convert.

Return Value

The result's of converting the argument to a Single.

Remarks

The ToSingle method returns the specified parameter as a float number. Since a Single has fewer significant digits than a Decimal, this operation may produce round-off errors.

This method implements IConvertible, which replaced IValue. This method is used to obtain the type code for a specified object. (See Convert and Value for more information about conversions; see the Type for more information about types.)

See Also

Decimal Structure | Decimal Members | System Namespace | Decimal.ToSingle Overload List