Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Convert.ToString Method (Byte)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Converts the value of the specified 8-bit unsigned integer to its equivalent string representation.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

public static string ToString(
	byte value


Type: System.Byte

The 8-bit unsigned integer to convert.

Return Value

Type: System.String

The string representation of value.

This implementation is identical to Byte.ToString().

The following example converts each value in a Byte array to a string.

using System;

public class Example
   public static void Main()
      byte[] values = { Byte.MinValue, 12, 100, 179, Byte.MaxValue } ;

      foreach (var value in values)
         Console.WriteLine("{0,3} ({1}) --> {2}", value, 
// The example displays the following output:
//       0 (Byte) --> 0
//      12 (Byte) --> 12
//     100 (Byte) --> 100
//     179 (Byte) --> 179
//     255 (Byte) --> 255

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
© 2018 Microsoft