▩▩ 프로그래밍 ▩▩/C#
[C#] byte[] -> hex
남쿤
2013. 9. 5. 10:18
반응형
// byte -> hex
public string ByteToHex(byte[] comByte)
{
StringBuilder builder = new StringBuilder(comByte.Length * 3);
foreach (byte data in comByte)
builder.Append(Convert.ToString(data, 16).PadLeft(2, '0'));
return builder.ToString().ToUpper();
}
반응형