コード例 #1
0
 public static string Decode(byte[] bytes, int index)
 {
     if (bytes != null && index > 0 && (bytes.Length - index) >= 8)
     {
         string str = BytesUtils.Bytes2HexString(bytes, index);
         return(str.Substring(1, 15));
     }
     throw new ArgumentException("invalid bytes length & index!");
 }
コード例 #2
0
 public static string GetDateStr(byte[] data, int startIndex)
 {
     byte[] dateBytes = new byte[6];
     Array.Copy(data, startIndex, dateBytes, 0, 6);
     return("20" + BytesUtils.Bytes2HexString(dateBytes, 0));
 }