c# 读取二进制文件并转换为 16 进制显示

string result = "";
string filePath = "xxx.bin";
if (File.Exists(filePath)) {
    byte[] b = File.ReadAllBytes(filePath);
    foreach (byte bt in b) {
        result += Convert.ToString(bt, 16);
    }
}
原文地址:https://www.cnblogs.com/xsbx/p/12018458.html