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
public static int ToInt32(
 string s
public: static int ToInt32(
 String* s
public static function ToInt32(
   s : String
) : int;


The string to convert.

Return Value

An Int32 equivalent of the string.


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.


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