vendredi 17 avril 2015

Byte[] to int[] without trimming 0x00

I have a byte array containing value like this: byte[] data={0x04,0x00};


I need to convert it to a string a print it as str_data=0x400


But when i convert this to string the data is printed as 40 where last 0x00 is considered as only 0.


I am new to C# and I am struggling to solve this. Please help.


Aucun commentaire:

Enregistrer un commentaire