1 public string ByteToString(byte[] inputBytes)
 2 {
 3     StringBuilder temp = new StringBuilder(2048);
 4     foreach (byte tempByte in inputBytes)
 5     {
 6         temp.Append(tempByte > 15 ?
 7         Convert.ToString(tempByte, 2) : '0' + Convert.ToString(tempByte, 2));
 8     }
 9     return temp.ToString();
10 }

 

posted on 2014-05-13 10:24  杨斐_Feil  阅读(323)  评论(0编辑  收藏  举报