Lobo
December 17th, 2002, 09:27 AM
Hi,
1. I want to convert some Hex numbers which contain unicode vallues into a string, Say, I have
0x0 0x0 0x4 0x2 which means "b" (I think)
I want to get a string containing "b".
I tried this:
-------------------------------------------
byte[] b = {0x0, 0x0 ,0x4 ,0x2};
System.Text.Encoding u = new System.Text.UnicodeEncoding();
string h = u.GetString(b);
--------------------------------------------
but the returned string equals "".
2. How can I convert an int or such to a hex-String ? Like I have int i = 0; and I want to get a string containing "0x0".
Thanks for you time !
regards, Lobo
1. I want to convert some Hex numbers which contain unicode vallues into a string, Say, I have
0x0 0x0 0x4 0x2 which means "b" (I think)
I want to get a string containing "b".
I tried this:
-------------------------------------------
byte[] b = {0x0, 0x0 ,0x4 ,0x2};
System.Text.Encoding u = new System.Text.UnicodeEncoding();
string h = u.GetString(b);
--------------------------------------------
but the returned string equals "".
2. How can I convert an int or such to a hex-String ? Like I have int i = 0; and I want to get a string containing "0x0".
Thanks for you time !
regards, Lobo