|
-
December 17th, 2002, 10:27 AM
#1
hex numbers (unicode) to String
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|