Click or drag to resize
Int64Parse Method (String, NumberStyles, IFormatProvider)
Converts the string representation of a number in a specified style and culture-specific format to its 64-bit signed integer equivalent.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static long Parse(
	string s,
	NumberStyles style,
	IFormatProvider provider
)

Parameters

s
Type: SystemString
A string containing a number to convert.
style
Type: System.GlobalizationNumberStyles
A bitwise combination of enumeration values that indicates the style elements that can be present in s. A typical value to specify is Integer.
provider
Type: SystemIFormatProvider
An IFormatProvider that supplies culture-specific formatting information about s.

Return Value

Type: Int64
A 64-bit signed integer equivalent to the number specified in s.
Exceptions
ExceptionCondition
ArgumentNullExceptions is null.
ArgumentExceptionstyle is not a NumberStyles value. -or-style is not a combination of AllowHexSpecifier and HexNumber values.
FormatExceptions is not in a format compliant with style.
OverflowExceptions represents a number less than MinValue or greater than MaxValue. -or-style supports fractional digits, but s includes non-zero fractional digits.
See Also