C# Byte ToString()
Description
Byte ToString()
converts the value of the current Byte
object to its equivalent string representation.
Syntax
Byte.ToString()
has the following syntax.
public override string ToString()
Returns
Byte.ToString()
method returns The string representation of the value of this object, which consists of
a sequence of digits that range from 0 to 9 with no leading zeroes.
Example
The following example displays an array of byte values.
using System;/*w w w .jav a2s . c o m*/
public class MainClass {
public static void Main(String[] argv){
byte[] bytes = {0, 1, 14, 168, 255};
foreach (byte byteValue in bytes){
Console.WriteLine(byteValue);
}
}
}
The code above generates the following result.