ConvertToInt16 Method (Int32) |
Converts the value of the specified 32-bit signed integer to an equivalent 16-bit signed integer.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public static short ToInt16(
int value
)
Parameters
- value
- Type: SystemInt32
The 32-bit signed integer to convert.
Return Value
Type:
Int16The 16-bit signed integer equivalent of
value.
Exceptions Exception | Condition |
---|
OverflowException | value is greater than MaxValue or less than MinValue. |
See Also