Share via


Int32.Parse Method

Converts the string representation of a number to its 32-bit signed integer equivalent.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Syntax

public static int Parse (
         strings
)

Parameters

  • s
    A string containing a number to convert.

Return Value

A 32-bit signed integer equivalent to the number contained in s.

Remarks

The s parameter contains a number of the form:

[ws][sign]digits[ws]

Items in square brackets ([ and ]) are optional; and the values of the other items are as follows.

ws

An optional white space.

sign

An optional sign.

digits

A sequence of digits ranging from 0 to 9.

The s parameter is parsed using the formatting information in a NumberFormatInfo initialized for the current system culture. For more information, see CurrentInfo.

Version Information

Available in .NET Micro Framework version 3.0 and above.

See Also

Reference

Int32 Structure
Int32 Members
System Namespace