Convert integer to string in C#

In this article we will discuss about how to convert integer to string in C#.
  • 8162

Here we are converting integer into string. For this we will use ToString() method. Here two string variable have been taken and have been converted into string using ToString() method.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication5
    class Program
        static void Main(string[] args)
            String number;
            String mynumber;
            int x = 10;
            number = x.ToString();
            int y = 20;
            mynumber = y.ToString();
            Console.WriteLine(number + " " + mynumber);


Further Readings
You may also want to read these related articles.

Ask Your Question

Got a programming related question? You may want to post your question here


More Articles

© 2020 DotNetHeaven. All rights reserved.