FormatterConverter.ToSingle(Object) 方法
定义
将值转换为单精度浮点数字。Converts a value to a single-precision floating-point number.
public:
virtual float ToSingle(System::Object ^ value);
public float ToSingle (object value);
abstract member ToSingle : obj -> single
override this.ToSingle : obj -> single
Public Function ToSingle (value As Object) As Single
参数
- value
- Object
要转换的对象。The object to convert.
返回
转换的 value;或者,如果 type 参数为 null,则为 null。The converted value or null if the type parameter is null.
实现
例外
value 参数为 null。The value parameter is null.
注解
此方法使用固定区域性 (参阅 CultureInfo.InvariantCulture) 。This method uses the invariant culture (see CultureInfo.InvariantCulture). 若要使用当前区域性或指定区域性,请改用 Convert.ToSingle 方法。To use the current culture or to specify a culture, use the Convert.ToSingle method instead. 有关详细信息,请参阅Single、Convert和ValueType。For more information, see Single, Convert, and ValueType.