CSharp examples for Language Basics:Data Type Cast
Cast double value to int value
using System;//from w ww . j a v a2 s.c om class ExplicitConversion { static void Main(string[] args) { double d = 1234.74; int i; // cast double to int. i = (int)d; Console.WriteLine(i); Console.ReadKey(); } }