久久久久久久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>

                            主站蜘蛛池模板: 欧美一区二区三区国产 | 久久久久久久一区二区三区 | 五月激情久久 | 成人亚洲精品 | 久久久久久久久久久高潮一区二区 | 婷婷在线免费 | 欧美成人一级视频 | 一区二区小视频 | 亚洲最大av | 天天爱av| 久久久久亚洲精品 | 一级片在线播放 | 成人免费精品视频 | 欧美黄色片 | www国产亚洲精品 | 亚洲精品乱码 | 天天干天天爽 | 成人毛片一区二区三区 | 99国产精品一区二区三区 | 欧美手机在线 | 亚洲精品一区国语对白 | 日本精品久久久久久久 | 特黄特色大片免费视频观看 | 国产激情视频在线 | 精品国产欧美一区二区 | 久久看片 | 久久在线免费 | 亚洲一区二区精品视频 | av一级在线观看 | 免费一二区 | 日本一区二区不卡 | 亚洲欧洲成人av每日更新 | 91精品国产91久久久久久吃药 | 中文字幕日韩专区 | 欧美中文一区 | 欧美日韩综合 | 国产综合视频 | 欧美日韩亚洲一区 | 欧美成人久久 | 毛片网站在线观看视频 | 久草中文在线观看 |