UInt32.ToString Method in C# with Examples | Set - 2 Last Updated : 11 Jul, 2025 Comments Improve Suggest changes Like Article Like Report UInt32.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 sequence of digits ranging from 0 to 9, without a sign or leading zeroes. Example: csharp // C# program to illustrate the // UInt32.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(UInt32.MaxValue); result(UInt32.MinValue); result(155156); result(199947); } // result() method public static void result(uint 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: 4294967295 The Corresponding String Value is: 0 The Corresponding String Value is: 155156 The Corresponding String Value is: 199947 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 numeric format string. Return Value: This method returns the string representation of the value of this instance as specified by format. Exception: This method will give FormatException if the format parameter is invalid. Example: csharp // C# program to demonstrate the // UInt32.ToString(String) Method using System; class GFG { // Main Method public static void Main() { try { // Declaring and initializing value uint val = 151256; // 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 1.51E+005 Reference: https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tostring?view=netstandard-2.1 Comment More infoAdvertise with us Next Article UInt16.ToString() Method in C# with Examples | Set - 1 K Kirti_Mangal Follow Improve Article Tags : C# CSharp-method CSharp-UInt32-Struct Similar Reads UInt32.ToString() Method in C# with Examples | Set - 1 UInt32.ToString Method is used to convert the numeric value of the current UInt32 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 3 min read UInt64.ToString Method in C# with Examples | Set - 2 UInt64.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 UInt16.ToString Method in C# with Examples | Set - 2 UInt16.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 UInt64.ToString() Method in C# with Examples | Set - 1 UInt64.ToString Method is used to convert the numeric value of the current UInt64 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 3 min read UInt16.ToString() Method in C# with Examples | Set - 1 UInt16.ToString Method is used to convert the numeric value of the current UInt16 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 3 min read UInt32.Parse(String) Method in C# with Examples UInt32.Parse(String) Method is used to convert the string representation of a number to its 32-bit unsigned integer equivalent. Syntax: public static uint Parse (string str); Here, str is a string containing a number to convert. The format of str will be [optional white space][optional sign]digits[o 2 min read Like