Converts a String to an Int32 with a specified style.
[Visual Basic] Overloads Public Shared Function Parse( _ ByVal s As String, _ ByVal style As NumberStyles _ ) As Integer [C#] public static int Parse( string s, NumberStyles style ); [C++] public: static int Parse( String* s, NumberStyles style ); [JScript] public static function Parse( s : String, style : NumberStyles ) : int;
An Int32 with the value represented by s.
If s has been created by one of the format methods using C, D, E, F, G, or N as the format specifier, it is guaranteed that s can be parsed when style is NumberStyles enumeration.
The style parameter must be a combination of bit flags from the NumberStyles enumeration. The numeric format information is obtained from the current locale (see NumberFormatInfo and CultureInfo for more information on numeric and culture formats).
Note Hexadecimal strings ("0x42") are not supported. Use Value or Convert ToIntxx(string, int) and ToUIntxx methods for the conversions.
Note The Parse methods does not accept not a number (NaN), or negative or positive infinity.
Int32 Structure | Int32 Members | System Namespace | Int32.Parse Overload List | String | Value | Convert | NaN | NaN | PositiveInfinity | PositiveInfinity | NegativeInfinity | NegativeInfinity