NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Int64.Parse (String)

Converts a String to an Int64.

[Visual Basic]
Overloads Public Shared Function Parse( _
   ByVal s As String _
) As Long
[C#]
public static long Parse(
   string s
);
[C++]
public: static __int64 Parse(
   String* s
);
[JScript]
public static function Parse(
   s : String
) : long;

Parameters

s
The string to be interpreted.

Return Value

An Int64 with the value represented by s.

Exceptions

Exception Type Condition
ArgumentNullException If the string is a null reference (in Visual Basic Nothing).
FormatException If the string is not the correct format.
OverflowException If the string represents a number that is less than MinValue or greater than MaxValue.

Remarks

The numeric format information is obtained from the current locale (see NumberFormatInfo and CultureInfo for more information on numeric and culture formats). The string s should be the return value of one of the format methods.

The string must consist of an optional minus sign ("-") followed by a sequence of digits ("0" through "9"). Leading and trailing white space characters are ignored.

An exception will be thrown if s does not match one of the following regular expressions:

[0-9]*\.[0-9]+;

[0-9]*\.[0-9]+e\+[0-9]+;

[0-9]*\.[0-9]+e[0-9]+;

[0-9]*\.[0-9]+e\-[0-9]+;

[0-9]+e\-[0-9]+;

[0-9]+e\+[0-9]+;

[0-9]+e[0-9]+.

Note   Hexadecimal strings ("0x42") are not supported. Use Value or Convert ToIntxx(string, int) and ToUIntxx methods for the conversions.
Note   The Parse methods do not accept not a number (NaN) or positive or negative infinity.

See Also

Int64 Structure | Int64 Members | System Namespace | Int64.Parse Overload List | String | MaxValue | MinValue | Value | Convert | NaN | NaN | PositiveInfinity | PositiveInfinity | NegativeInfinity | NegativeInfinity