Click or drag to resize
ConvertToInt16 Method (Int32)
Converts the value of the specified 32-bit signed integer to an equivalent 16-bit signed integer.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static short ToInt16(
	int value
)

Parameters

value
Type: SystemInt32
The 32-bit signed integer to convert.

Return Value

Type: Int16
The 16-bit signed integer equivalent of value.
Exceptions
ExceptionCondition
OverflowExceptionvalue is greater than MaxValue or less than MinValue.
See Also