zoukankan      html  css  js  c++  java
  • 16进制操作类

    class HexCon {
       // 把十六进制字符串转换成字节型和把字节型转换成十六进制字符串 converter hex string to byte and byte to hex string
          public static string ByteToString(byte[] InBytes) {
             string StringOut="";
             foreach (byte InByte in InBytes) {
                StringOut=StringOut + String.Format("{0:X2} ",InByte);
             }
             return StringOut; 
          }
          public static byte[] StringToByte(string InString) {
             string[] ByteStrings;
             ByteStrings = InString.Split(" ".ToCharArray());
             byte[] ByteOut;
             ByteOut = new byte[ByteStrings.Length-1];
             for (int i = 0;i==ByteStrings.Length-1;i++) {
                ByteOut[i] = Convert.ToByte(("0x" + ByteStrings[i]));
             } 
             return ByteOut;
          }
       }

  • 相关阅读:
    viewpaper
    mfc ui 3 swf
    mfc ui3
    mfc ui2
    mfc ui库
    将Cocos2dX渲染到MFC窗口上
    MFC 框架技术简单研讨
    不可忽略的数据库缓存重建
    google bookmarket api
    android 加载大图片
  • 原文地址:https://www.cnblogs.com/xihong2014/p/13337719.html
Copyright © 2011-2022 走看看