// C# program for type conversion from double to int
using System;
using System.IO;
using System.Text;
namespace IncludeHelp
{
class Test
{
// Main Method
static void Main(string[] args)
{
double a = 123456.789;
int b = 0;
//type conversion
b = (int)a;
Console.WriteLine("value of a: {0}", a);
Console.WriteLine("value of b: {0}", b);
//hit ENTER to exit the program
Console.ReadLine();
}
}
}
C# code for type conversion from double to int
Output