Convert char array To byte array

G

Guest

Hi...

I need to know how to convert Char Array to Byte Array and vice-versa in VB
2K5

Thanks for all help.
Elioth
 
M

Mattias Sjögren

I need to know how to convert Char Array to Byte Array and vice-versa in VB
2K5

If you want to do a straight memory copy where one Char takes two
Bytes, use System.Buffer.BlockCopy(). Otherwise use the appropriate
Encoding class from the System.Text namespace and call the GetChars
and GetBytes methods.


Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top