Single.IConvertible.ToType(Type, IFormatProvider) 方法

定义

有关此成员的说明,请参见 ToType(Type, IFormatProvider)For a description of this member, see ToType(Type, IFormatProvider).

 virtual System::Object ^ System.IConvertible.ToType(Type ^ type, IFormatProvider ^ provider) = IConvertible::ToType;
object IConvertible.ToType (Type type, IFormatProvider provider);
abstract member System.IConvertible.ToType : Type * IFormatProvider -> obj
override this.System.IConvertible.ToType : Type * IFormatProvider -> obj
Function ToType (type As Type, provider As IFormatProvider) As Object Implements IConvertible.ToType

参数

type
Type

Single 值要转换为的类型。The type to which to convert this Single value.

provider
IFormatProvider

提供有关返回值格式信息的对象。An object that supplies information about the format of the returned value.

返回

Object

当前实例的值,已转换为 typeThe value of the current instance, converted to type.

实现

注解

此成员是显式接口成员的实现。This member is an explicit interface member implementation. 它只能在 Single 实例被强制转换为 IConvertible 接口时使用。It can be used only when the Single instance is cast to an IConvertible interface. 建议的替代 static Shared 项是在 Visual Basic) 方法中调用 (Convert.ChangeTypeThe recommended alternative is to call the static (Shared in Visual Basic) Convert.ChangeType method.

适用于