By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,290 Members | 1,426 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,290 IT Pros & Developers. It's quick & easy.

Convert String or char[] to byte[]

P: n/a
How can I convert a String or a char[] to byte[]?
Nov 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Check out UnicodeEncoding.GetBytes(). It has many overloads too.

"Marius Cabas" <ma**********@hotmail.com> wrote in message
news:#l**************@TK2MSFTNGP09.phx.gbl...
How can I convert a String or a char[] to byte[]?

Nov 16 '05 #2

P: n/a
Use the ToCharArray method of a string to convert to a character array.

Use the GetBytes method of one of the Encoding classes to convert a string
to a byte array.
"Marius Cabas" <ma**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
How can I convert a String or a char[] to byte[]?

Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.