UInt16.IConvertible.ToType(Type, IFormatProvider) UInt16.IConvertible.ToType(Type, IFormatProvider) Method

定义

有关此成员的说明,请参见 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);

参数

type
Type Type

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

provider
IFormatProvider IFormatProvider

一个 IFormatProvider 实现,提供有关返回值格式的信息。An IFormatProvider implementation that supplies information about the format of the returned value.

返回

转换为 type 的该实例的当前值。The current value of this instance, converted to type.

实现

注解

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

适用于