This documentation is archived and is not being maintained.

XmlConvert.ToInt32 Method

Converts the String to a Int32 equivalent.

[Visual Basic]
Public Shared Function ToInt32( _
   ByVal s As String _
) As Integer
[C#]
public static int ToInt32(
 string s
);
[C++]
public: static int ToInt32(
 String* s
);
[JScript]
public static function ToInt32(
   s : String
) : int;

Parameters

s
The string to convert.

Return Value

An Int32 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 Int32.MinValue or greater than Int32.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: