How to display byte array hex values?

后端 未结 2 1679
旧时难觅i
旧时难觅i 2021-01-17 22:17

Hi i am making application in c#.I have byte array of containing hex values.I want to to write that values as it is in file without converting it into string or anything els

2条回答
  •  星月不相逢
    2021-01-17 22:38

    You can't avoid converting it to a string if you want to display it. You can use:

    String.Format("{0,10:X}", hexValue)
    

提交回复
热议问题