Char.IConvertible.ToUInt16(IFormatProvider) Char.IConvertible.ToUInt16(IFormatProvider) Char.IConvertible.ToUInt16(IFormatProvider) Method

定義

重要

此 API 不符合 CLS 規範。

如需這個成員的說明,請參閱 ToUInt16(IFormatProvider)For a description of this member, see ToUInt16(IFormatProvider).

 virtual System::UInt16 System.IConvertible.ToUInt16(IFormatProvider ^ provider) = IConvertible::ToUInt16;
[System.CLSCompliant(false)]
ushort IConvertible.ToUInt16 (IFormatProvider provider);
Function ToUInt16 (provider As IFormatProvider) As UShort Implements IConvertible.ToUInt16

參數

provider
IFormatProvider IFormatProvider IFormatProvider

IFormatProvider 物件。An IFormatProvider object. (指定 null,因為已忽略 provider 參數。)(Specify null because the provider parameter is ignored.)

傳回

目前 Char 物件的轉換值。The converted value of the current Char object.

實作

備註

這個成員是明確介面成員實作,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.

適用於