久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <i id='ABYU2'><tr id='ABYU2'><dt id='ABYU2'><q id='ABYU2'><span id='ABYU2'><b id='ABYU2'><form id='ABYU2'><ins id='ABYU2'></ins><ul id='ABYU2'></ul><sub id='ABYU2'></sub></form><legend id='ABYU2'></legend><bdo id='ABYU2'><pre id='ABYU2'><center id='ABYU2'></center></pre></bdo></b><th id='ABYU2'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ABYU2'><tfoot id='ABYU2'></tfoot><dl id='ABYU2'><fieldset id='ABYU2'></fieldset></dl></div>
    • <bdo id='ABYU2'></bdo><ul id='ABYU2'></ul>

    <small id='ABYU2'></small><noframes id='ABYU2'>

      <tfoot id='ABYU2'></tfoot>
      1. <legend id='ABYU2'><style id='ABYU2'><dir id='ABYU2'><q id='ABYU2'></q></dir></style></legend>

        將長(zhǎng)二進(jìn)制字符串轉(zhuǎn)換為十六進(jìn)制c#

        Converting long string of binary to hex c#(將長(zhǎng)二進(jìn)制字符串轉(zhuǎn)換為十六進(jìn)制c#)

      2. <small id='KXsJI'></small><noframes id='KXsJI'>

          • <bdo id='KXsJI'></bdo><ul id='KXsJI'></ul>
              <tbody id='KXsJI'></tbody>

          • <tfoot id='KXsJI'></tfoot>
            <legend id='KXsJI'><style id='KXsJI'><dir id='KXsJI'><q id='KXsJI'></q></dir></style></legend>

                <i id='KXsJI'><tr id='KXsJI'><dt id='KXsJI'><q id='KXsJI'><span id='KXsJI'><b id='KXsJI'><form id='KXsJI'><ins id='KXsJI'></ins><ul id='KXsJI'></ul><sub id='KXsJI'></sub></form><legend id='KXsJI'></legend><bdo id='KXsJI'><pre id='KXsJI'><center id='KXsJI'></center></pre></bdo></b><th id='KXsJI'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='KXsJI'><tfoot id='KXsJI'></tfoot><dl id='KXsJI'><fieldset id='KXsJI'></fieldset></dl></div>

                  本文介紹了將長(zhǎng)二進(jìn)制字符串轉(zhuǎn)換為十六進(jìn)制c#的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  限時(shí)送ChatGPT賬號(hào)..

                  我正在尋找一種將長(zhǎng)二進(jìn)制字符串轉(zhuǎn)換為十六進(jìn)制字符串的方法.

                  I'm looking for a way to convert a long string of binary to a hex string.

                  二進(jìn)制字符串看起來(lái)像這樣 "0110011010010111001001110101011100110100001101101000011001010110001101101011"

                  the binary string looks something like this "0110011010010111001001110101011100110100001101101000011001010110001101101011"

                  我嘗試過(guò)使用

                  hex = String.Format("{0:X2}", Convert.ToUInt64(hex, 2));
                  

                  但這只有在二進(jìn)制字符串適合 Uint64 時(shí)才有效,如果字符串足夠長(zhǎng)則不會(huì).

                  but that only works if the binary string fits into a Uint64 which if the string is long enough it won't.

                  還有其他方法可以將二進(jìn)制字符串轉(zhuǎn)換為十六進(jìn)制嗎?

                  is there another way to convert a string of binary into hex?

                  謝謝

                  推薦答案

                  我剛剛把這個(gè)搞砸了.或許你可以以此為起點(diǎn)……

                  I just knocked this up. Maybe you can use as a starting point...

                  public static string BinaryStringToHexString(string binary)
                  {
                      if (string.IsNullOrEmpty(binary))
                          return binary;
                  
                      StringBuilder result = new StringBuilder(binary.Length / 8 + 1);
                  
                      // TODO: check all 1's or 0's... throw otherwise
                  
                      int mod4Len = binary.Length % 8;
                      if (mod4Len != 0)
                      {
                          // pad to length multiple of 8
                          binary = binary.PadLeft(((binary.Length / 8) + 1) * 8, '0');
                      }
                  
                      for (int i = 0; i < binary.Length; i += 8)
                      {
                          string eightBits = binary.Substring(i, 8);
                          result.AppendFormat("{0:X2}", Convert.ToByte(eightBits, 2));
                      }
                  
                      return result.ToString();
                  }
                  

                  這篇關(guān)于將長(zhǎng)二進(jìn)制字符串轉(zhuǎn)換為十六進(jìn)制c#的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  What are good algorithms for vehicle license plate detection?(車牌檢測(cè)有哪些好的算法?)
                  onClick event for Image in Unity(Unity中圖像的onClick事件)
                  Running Total C#(運(yùn)行總 C#)
                  Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時(shí)刪除目錄)
                  asp.net listview highlight row on click(asp.net listview 在單擊時(shí)突出顯示行)
                  Calling A Button OnClick from a function(從函數(shù)調(diào)用按鈕 OnClick)
                    <tbody id='eC09L'></tbody>
                    • <bdo id='eC09L'></bdo><ul id='eC09L'></ul>

                      <legend id='eC09L'><style id='eC09L'><dir id='eC09L'><q id='eC09L'></q></dir></style></legend>

                          <tfoot id='eC09L'></tfoot>

                          <small id='eC09L'></small><noframes id='eC09L'>

                        • <i id='eC09L'><tr id='eC09L'><dt id='eC09L'><q id='eC09L'><span id='eC09L'><b id='eC09L'><form id='eC09L'><ins id='eC09L'></ins><ul id='eC09L'></ul><sub id='eC09L'></sub></form><legend id='eC09L'></legend><bdo id='eC09L'><pre id='eC09L'><center id='eC09L'></center></pre></bdo></b><th id='eC09L'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='eC09L'><tfoot id='eC09L'></tfoot><dl id='eC09L'><fieldset id='eC09L'></fieldset></dl></div>

                            主站蜘蛛池模板: 中文字幕1区2区3区 亚洲国产成人精品女人久久久 | 国产精品久久久久久婷婷天堂 | 成人国产午夜在线观看 | 在线亚洲欧美 | 狠狠色狠狠色综合系列 | 91精品国产综合久久国产大片 | 精品无码三级在线观看视频 | 国产精品99久久久精品免费观看 | 欧美黑人一区二区三区 | 国产91观看 | 成人精品一区二区三区四区 | 国产成人在线视频 | 欧美一区二区在线播放 | 日韩伦理一区二区 | 91精品国产高清久久久久久久久 | 久久久久久亚洲精品 | 国产欧美日韩久久久 | 欧美成人一区二区 | 国产精品久久久久久网站 | 91成人在线 | 国内精品久久精品 | 午夜欧美一区二区三区在线播放 | 欧美日韩中文字幕 | 日韩专区中文字幕 | 亚洲一区三区在线观看 | 亚洲成人精品一区二区 | 日本粉嫩一区二区三区视频 | 日韩欧美国产一区二区三区 | 亚洲一级淫片 | 99精品久久久国产一区二区三 | 亚洲精品2区 | 精品综合 | 日本不卡一区二区三区 | 欧美精品一区二区三区蜜臀 | 亚洲国产成人久久综合一区,久久久国产99 | 碰碰视频 | 欧美乱人伦视频 | 欧美成年黄网站色视频 | 91在线精品一区二区 | 亚洲人成在线播放 | 国产精品伦一区二区三级视频 |