Enum.IConvertible.ToInt16(IFormatProvider) 方法

定義

根據基礎類型,將目前值轉換成 16 位元帶正負號的整數 (Signed Integer)。Converts the current value to a 16-bit signed integer based on the underlying type.

 virtual short System.IConvertible.ToInt16(IFormatProvider ^ provider) = IConvertible::ToInt16;
short IConvertible.ToInt16 (IFormatProvider provider);
abstract member System.IConvertible.ToInt16 : IFormatProvider -> int16
override this.System.IConvertible.ToInt16 : IFormatProvider -> int16
Function ToInt16 (provider As IFormatProvider) As Short Implements IConvertible.ToInt16

參數

provider
IFormatProvider

物件,其提供特定文化特性格式資訊。An object that supplies culture-specific formatting information.

傳回

轉換的值。The converted value.

實作

備註

會使用 Convert 來執行轉換。Uses Convert to perform the conversion.

適用於