C# Convert ToInt64(Object)
Description
Convert ToInt64(Object)
converts the value of the specified
object to a 64-bit signed integer.
Syntax
Convert.ToInt64(Object)
has the following syntax.
public static long ToInt64(
Object value
)
Parameters
Convert.ToInt64(Object)
has the following parameters.
value
- An object that implements the IConvertible interface, or null.
Returns
Convert.ToInt64(Object)
method returns A 64-bit signed integer that is equivalent to value, or zero if value is null.
Example
//from w ww .j a v a2 s. c o m
using System;
public class MainClass{
public static void Main(String[] argv){
System.Console.WriteLine(Convert.ToInt64((Object)123));
}
}
The code above generates the following result.