Converts a Byte to a Single.
[Visual Basic] Overridable Public Function ToSingle() As Single [C#] public virtual float ToSingle(); [C++] public: virtual float ToSingle(); [JScript] public function ToSingle() : float;
A float value
Exception Type | Condition |
---|---|
InvalidCastException | is thrown if it doesn't return a float. |
The ToSingle method returns the specified parameter as a float number.
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.)