Use #, % and in int format

   
  

using System;
public class FormatSpecApp {
    public static void Main(string[] args) {
        int i = 123456;
        Console.WriteLine();
        Console.WriteLine("{0:#0}", i);             // 123456
        Console.WriteLine("{0:#0;(#0)}", i);        // 123456
        Console.WriteLine("{0:#0;(#0);<zero>}", i); // 123456
        Console.WriteLine("{0:#%}", i);     // 12345600%

        i = -123456;
        Console.WriteLine();
        Console.WriteLine("{0:#0}", i);             // -123456
        Console.WriteLine("{0:#0;(#0)}", i);        // (123456)
        Console.WriteLine("{0:#0;(#0);<zero>}", i); // (123456)
        Console.WriteLine("{0:#%}", i);             // -12345600%

        i = 0;
        Console.WriteLine();
        Console.WriteLine("{0:#0}", i);             // 0
        Console.WriteLine("{0:#0;(#0)}", i);        // 0
        Console.WriteLine("{0:#0;(#0);<zero>}", i); // <zero>
        Console.WriteLine("{0:#%}", i);             // %
    }
}

   
     


Catch OverflowException Exception

   
 



using System;
   
class MainClass
{
    public static void Main()
    {
        try
        {
            checked
            {
                int Integer1;
                int Integer2;
                int Sum;
   
                Integer1 = 9999999999;
                Integer2 = 2000000000;
                Sum = Integer1 + Integer2;
            }
        }
        catch(OverflowException)
        {
            Console.WriteLine("A mathematical operation caused an overflow.");
        }
    }
}

           
         
     


Use CultureInfo int ToString method

   
 


using System;
using System.Globalization;
using System.Threading;

class Program {
    static void Main(string[] args) {
        int val = 1234567890;
        Console.WriteLine(val.ToString("N"));
        Console.WriteLine(val.ToString("N",new CultureInfo("fr-FR")));
        Thread.CurrentThread.CurrentCulture = new CultureInfo("de-DE");
        Console.WriteLine(val.ToString("N"));
    }
}