xFactorSchool.com(Beta)
How to Do Examples
Python Examples
HTML Examples
Code Examples
C Code Examples
C++ Code Examples
C# Code Examples
Java Code Examples
Python Code Examples
HTML Code Examples
CSS Code Examples
JavaScript Code Examples
Online Editor
C Code Editor
C++ Code Editor
C# Code Editor
Java Code Editor
Python Code Editor
HTML Code Editor
CSS Code Editor
JavaScript Code Editor
Practice how to convert integer or decimal type to string type in C#
C# Online Editor
Execute Code
More C# Sample Code
using System; namespace ExampleApp { class Program { static void Main(string[] args) { // Convert integer to string int integerVariable = 1225; // Integer data string convertedintegertoString = integerVariable.ToString(); //using toString() method Console.WriteLine(convertedintegertoString); //Convert string (only number) to integer string stringVariable = "1225"; // string data int convertedStringtoInteger = Convert.ToInt32(stringVariable); //using Convert.ToInt32() method Console.WriteLine(convertedintegertoString); // Convert integer to string decimal decimalVariable = 123.45m; string convertedDecimaltoString = decimalVariable.ToString(); //using toString() method Console.WriteLine(convertedDecimaltoString); } } }