2015년 9월 21일 월요일

[ C# ] Byte Array -> String 변환

Byte Array -> String 변환
public static string ByteArrayToString(byte[] ba)
{
  StringBuilder hex = new StringBuilder(ba.Length * 2);
  foreach (byte b in ba)
    hex.AppendFormat("{0:x2}", b);
  return hex.ToString();

}

댓글 없음:

댓글 쓰기