How can I convert a binary file to another binary representation, like an image

前端 未结 6 808
花落未央
花落未央 2020-12-20 22:10

I want to take a binary file (exe, msi, dll, whatever) and be able to actually \"see\" the binary code or whatever base I\'d like (hexadecimal whatever). Figured the easiest

6条回答
  •  不知归路
    2020-12-20 22:58

    You can read all bytes of a file in C# or any .NET language by calling the static method ReadAllBytes.

    byte[] allBytes = File.ReadAllBytes("YourPath");
    

    It will put all the bytes into an array.

    If you want to covert it to HexaDecimal see here.

提交回复
热议问题