Decimal.IConvertible.ToInt16(IFormatProvider) Método

Definição

Para obter uma descrição desse membro, confira ToInt16(IFormatProvider).For a description of this member, see ToInt16(IFormatProvider).

 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

Parâmetros

provider
IFormatProvider

Este parâmetro é ignorado.This parameter is ignored.

Retornos

Int16

O valor da instância atual, convertido em um Int16.The value of the current instance, converted to a Int16.

Implementações

Exceções

O valor inteiro resultante é menor que MinValue ou maior que MaxValue.The resulting integer value is less than MinValue or greater than MaxValue.

Comentários

Este membro é uma implementação do membro de interface explícita.This member is an explicit interface member implementation. Ele só pode ser usado quando a instância de Decimal é convertida em uma interface de IConvertible.It can be used only when the Decimal instance is cast to an IConvertible interface. A alternativa recomendada é chamar o Decimal.ToInt16 método ou o Convert.ToInt16 método.The recommended alternative is to call either the Decimal.ToInt16 method or the Convert.ToInt16 method.

O valor Decimal é arredondado para zero até o valor inteiro mais próximo.The Decimal value is rounded toward zero to the nearest integer value.

Aplica-se a