Export (0) Print
Expand All

Convert.ToInt16 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)

public static short ToInt16(
	int value
)

Parameters

value
Type: System.Int32
A 32-bit signed integer.

Return Value

Type: System.Int16
The 16-bit signed integer equivalent of value.

ExceptionCondition
OverflowException

value is greater than Int16.MaxValue or less than Int16.MinValue.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft