Convert.ToInt16 Method (Object)
Silverlight
Converts the value of the specified Object to a 16-bit signed integer.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Parameters
- value
- Type: System.Object
An Object that implements the IConvertible interface or null.
Return Value
Type: System.Int16A 16-bit signed integer equivalent to the value of value, or zero if value is null.
| Exception | Condition |
|---|---|
| InvalidCastException | value does not implement IConvertible. |
If value is not null, this method wraps a call to the IConvertible.ToInt16 implementation of the underlying type of value.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.