CSharp examples for Language Basics:int
Check int value overflow
using System;/*from ww w . j a v a 2 s . co m*/ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Program { static void Main(string[] args) { // Multiplying million by million int million = 1000000; int result = million * million; long resultInLong = million * million; Console.WriteLine("Million times million: " + result); Console.WriteLine("also in long: " + resultInLong); } }