Possible Duplicate:
How do you convert Byte Array to Hexadecimal String, and vice versa, in C#?
Is it possbile to convert the content of a string in exactly the same way to a byte array?
For example: I have a string like:
string strBytes="0xab, 0xcd, 0xef, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0x01, 0x23, 0x45, 0x67, 0x89";
Is there any function which can give me the following result if i pass strBytes to it.
Byte[] convertedbytes ={0xab, 0xcd, 0xef, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0x01, 0x23, 0x45, 0x67, 0x89};