Decimal.IConvertible.ToInt16 Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
For a description of this member, see IConvertible.ToInt16.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- provider
- Type: System.IFormatProvider
This parameter is ignored.
Implements
IConvertible.ToInt16(IFormatProvider)| Exception | Condition |
|---|---|
| OverflowException | The resulting integer value is less than MinValue or greater than MaxValue. |
This member is an explicit interface member implementation. It can be used only when the Decimal instance is cast to an IConvertible interface. The recommended alternative is to call either the Decimal.ToInt16 method or the Convert.ToInt16 method.
The Decimal value is rounded toward zero to the nearest integer value.