Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Convert.ToInt64 Method (Double)

.NET Framework 1.1

Converts the value of the specified double-precision floating point number to an equivalent 64-bit signed integer.

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

Parameters

value
A double-precision floating point number.

Return Value

value rounded to the nearest 64-bit signed integer. If value is halfway between two whole numbers, the even number is returned; that is, 4.5 is converted to 4, and 5.5 is converted to 6.

Exceptions

Exception Type Condition
OverflowException value is greater than Int64.MaxValue or less than Int64.MinValue.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

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

Show:
© 2015 Microsoft