Converts a string to a 32-bit integer value.
[Visual Basic] Public Shared Function ToInt32( _ ByVal value As String _ ) As Integer [C#] public static int ToInt32( string value ); [C++] public: static int ToInt32( String* value ); [JScript] public static function ToInt32( value : String ) : int;
The 32-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 32-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-2147483648 and 2147483647. Leading and trailing blanks are not permitted.
XmlString Class | XmlString Members | System.Xml Namespace | FromInt32