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!

Convert.ToInt64 (String)

Converts a String to an Int64 value.

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

Parameters

value
A string representation of an Int64 value.

Return Value

An Int64 with the value represented by value .

Exceptions

Exception Type Condition
ArgumentException If value is null.
FormatException Is thrown if value cannot be parsed or the value represented is greater than Int64.MaxValue or less than Int64.MinValue.
OverflowException If value represents a number that is less than Int64.MinValue or greater than Int64.MaxValue. Note that if the beginning of the string value contains a properly formatted numerical value that will result in an overflow and, in addition, the end of the string is improperly formed, it cannot be determined whether an OverflowException or a FormatException will be thrown. This has been implemented this way for performance reasons.

Remarks

value is parsed as a decimal unless it is preceded by 0x, in which case it is parsed as a hexadecimal number. White space or trailing characters will cause a FormatException. The implementation is provided by FromString.

See Also

Convert Class | Convert Members | System Namespace | Convert.ToInt64 Overload List