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!

Decimal.ToInt64 ()

Converts a Decimal to an Int64 with the default format.

[Visual Basic]
Overloads Overridable Public Function ToInt64() As Long
[C#]
public virtual long ToInt64();
[C++]
public: virtual __int64 ToInt64();
[JScript]
public function ToInt64() : long;

Return Value

The result's of converting the argument to a long.

Exceptions

Exception Type Condition
OverflowException is thrown if d is less than Int64.MinValue or greater than Int64.MaxValue.

Remarks

The ToInt64 method returns a long. It returns a 64-bit, 8-byte signed integer with the converted number.

The Decimal value is rounded toward zero to the nearest integer value, and the result of this operation is returned as a long.

This method implements IConvertible, which replaced IValue. This method is used to obtain the type code for a specified object. (See Convert and Value for more information about conversions; see the Type for more information about types.)

See Also

Decimal Structure | Decimal Members | System Namespace | Decimal.ToInt64 Overload List