Converting long string of binary to hex c#

前端 未结 10 1116
無奈伤痛
無奈伤痛 2020-11-29 11:25

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

the binary string looks something like this \"01100110100101110010011101010111001101

10条回答
  •  星月不相逢
    2020-11-29 11:55

    This might help you:

    string HexConverted(string strBinary)
        {
            string strHex = Convert.ToInt32(strBinary,2).ToString("X");
            return strHex;
        }
    

提交回复
热议问题