Export (0) Print
Expand All

XmlConvert.ToInt16 Method

Converts the String to a Int16 equivalent.

[Visual Basic]
Public Shared Function ToInt16( _
   ByVal s As String _
) As Short
[C#]
public static short ToInt16(
 string s
);
[C++]
public: static short ToInt16(
 String* s
);
[JScript]
public static function ToInt16(
   s : String
) : Int16;

Parameters

s
The string to convert.

Return Value

An Int16 equivalent of the string.

Exceptions

Exception Type Condition
ArgumentNullException s is a null reference (Nothing in Visual Basic).
FormatException s is not in the correct format.
OverflowException s represents a number less than Int16.MinValue or greater than Int16.MaxValue.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

XmlConvert Class | XmlConvert Members | System.Xml Namespace

Show:
© 2014 Microsoft