System.Convert.ToInt16 Method

Converts the value of the specified object to a 16-bit signed integer.

Syntax

public static short ToInt16 (object value)

Parameters

value
An object that implements the IConvertible interface, or null.

Returns

A 16-bit signed integer that is equivalent to value, or zero if value is null.

Remarks

If value is not null, this method wraps a call to the IConvertible.ToInt16(IFormatProvider) implementation of the underlying type of value.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0