Rediger

Del via


FormatterConverter.ToInt16(Object) Method

Definition

Converts a value to a 16-bit signed integer.

public:
 virtual short ToInt16(System::Object ^ value);
public short ToInt16 (object value);
abstract member ToInt16 : obj -> int16
override this.ToInt16 : obj -> int16
Public Function ToInt16 (value As Object) As Short

Parameters

value
Object

The object to convert.

Returns

The converted value or null if the type parameter is null.

Implements

Exceptions

The value parameter is null.

Remarks

This method uses the invariant culture (see CultureInfo.InvariantCulture). To use the current culture or to specify a culture, use the Convert.ToInt16 method instead. For more information, see Int16, Convert, and ValueType.

Applies to