Format byte to Hexadecimal with X4 in CSharp
Description
The following code shows how to format byte to Hexadecimal with X4.
Example
using System;// w w w . j a v a2 s . c o m
public class MainClass{
public static void Main(){
byte[] byteValues = { 12, 163, 255 };
foreach (byte byteValue in byteValues)
Console.WriteLine(byteValue.ToString("X4"));
}
}