C# | Int32.ToString Method | Set - 2 Last Updated : 11 Jul, 2025 Comments Improve Suggest changes Like Article Like Report Int32.ToString Method is used to convert the numeric value of the current instance to its equivalent string representation. There are 4 methods in the overload list of this method as follows: ToString(IFormatProvider) Method ToString(String, IFormatProvider) Method ToString() Method ToString(String) Method Here we will discuss the last two methods. ToString() Method This method is used to convert the numeric value of the current instance to its equivalent string representation. Syntax: public override string ToString (); Return Value: This method returns the string representation of the value of the current instance, consisting of a minus sign if the value is negative, and a sequence of digits ranging from 0 to 9 with no leading zeroes. Example: csharp // C# program to illustrate the // Int32.ToString() Method using System; using System.Globalization; class GFG { // Main Method public static void Main() { Console.WriteLine("The String values are: "); // calling the method result(Int32.MaxValue); result(Int32.MinValue); result(78006596); result(86542626); } // result() method public static void result(int p) { // using ToString() method string str = p.ToString(); // Display the value Console.WriteLine("The Corresponding String "+ "Value is: {0}", str); } } Output: The String values are: The Corresponding String Value is: 2147483647 The Corresponding String Value is: -2147483648 The Corresponding String Value is: 78006596 The Corresponding String Value is: 86542626 ToString(String) Method This method is used to convert the numeric value of the current instance to its equivalent string representation, using the specified format. Syntax: public string ToString (string format); Parameters: This method takes standard or custom numeric format string. Return Value: This method returns the string representation of the value of this instance as specified by format. Example: csharp // C# program to demonstrate the // Int32.ToString(String) Method using System; class GFG { // Main Method public static void Main() { try { // Declaring and initializing value int val = 214563; // Declaring and initializing format string format = "E2"; // using the method string result = val.ToString(format); // Display the result Console.WriteLine("The value of string is {0}", result); } catch (FormatException e) { Console.WriteLine("Format is invalid."); Console.Write("Exception Thrown: "); Console.Write("{0}", e.GetType(), e.Message); } } } Output: The value of string is 2.15E+005 Reference: https://learn.microsoft.com/en-us/dotnet/api/system.int32.tostring?view=netframework-4.7.2 Comment More infoAdvertise with us Next Article C# | Int16.ToString Method | Set - 1 K Kirti_Mangal Follow Improve Article Tags : C# CSharp-method CSharp-Int32-Struct Similar Reads C# | Int32.ToString Method | Set - 1 Int32.ToString Method is used to converts the numeric value of the current Int32 instance to its equivalent string representation. There are 4 methods in the overload list of this method as follows:Here, we will discuss the first two methods. ToString(IFormatProvider) Method This method is used to c 2 min read C# | Int64.ToString Method | Set - 2 Int64.ToString Method is used to convert the numeric value of the current instance to its equivalent string representation. There are 4 methods in the overload list of this method as follows: ToString(IFormatProvider) Method ToString(String, IFormatProvider) Method ToString() Method ToString(String) 2 min read C# | Int16.ToString Method | Set - 2 Int16.ToString Method is used to convert the numeric value of the current instance to its equivalent string representation. There are 4 methods in the overload list of this method as follows: ToString(IFormatProvider) Method ToString(String, IFormatProvider) Method ToString() Method ToString(String) 2 min read C# | Int64.ToString Method | Set - 1 Int64.ToString Method is used to convert the numeric value of the current instance to its equivalent string representation. There are 4 methods in the overload list of this method as follows: ToString(IFormatProvider) MethodToString(String, IFormatProvider) MethodToString( ) MethodToString(String) M 2 min read C# | Int16.ToString Method | Set - 1 Int16.ToString Method is used to convert the numeric value of the current instance to its equivalent string representation. There are 4 methods in the overload list of this method as follows: ToString(IFormatProvider) Method ToString(String, IFormatProvider) Method ToString() Method ToString(String) 2 min read Single.ToString() Method in C# | Set - 2 Single.ToString() Method is used to convert the numeric value of the current instance to its equivalent string representation. There are 4 methods in the overload list of this method as follows: ToString(String) Method ToString() Method ToString(IFormatProvider) Method ToString(String, IFormatProvid 2 min read Like