Converts a string to a 16-bit integer value.
[Visual Basic] Public Shared Function ToInt16( _ ByVal value As String _ ) As Short [C#] public static short ToInt16( string value ); [C++] public: static short ToInt16( String* value ); [JScript] public static function ToInt16( value : String ) : Int16;
The 16-bit integer value represented by the string.
Exception Type | Condition |
---|---|
XmlException | If value is null or a reference to a string that does not contain a valid decimal representation of a 16-bit integer. |
The value parameter must be a non-null reference to a string that contains a well-formed decimal representation of a number between-32768 and 32768. Leading and trailing blanks are not permitted.
XmlString Class | XmlString Members | System.Xml Namespace | FromInt16