Char.IConvertible.ToUInt16(IFormatProvider) Method

Definition

Important

This API is not CLS-compliant.

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

 virtual System::UInt16 System.IConvertible.ToUInt16(IFormatProvider ^ provider) = IConvertible::ToUInt16;
ushort IConvertible.ToUInt16 (IFormatProvider provider);
[System.CLSCompliant(false)]
ushort IConvertible.ToUInt16 (IFormatProvider provider);
abstract member System.IConvertible.ToUInt16 : IFormatProvider -> uint16
override this.System.IConvertible.ToUInt16 : IFormatProvider -> uint16
Function ToUInt16 (provider As IFormatProvider) As UShort Implements IConvertible.ToUInt16

Parameters

provider
IFormatProvider

一个 IFormatProvider 对象。An IFormatProvider object. (由于 null 参数已被忽略,因此指定 provider。)(Specify null because the provider parameter is ignored.)

Returns

UInt16

当前 Char 对象的转换值。The converted value of the current Char object.

Implements

Attributes

Remarks

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

Applies to