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

How do I convert string to array of byte?

P: n/a

I something like this:

dim mybytes() as byte = "hello world"

The string is ascii.
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Dim bytes As Byte()
Dim text As String = "hello world"
Dim b As Byte
bytes = System.Text.ASCIIEncoding.ASCII.GetBytes(text)

Hope it helps :)

Mythran

"aurora" <spam> wrote in message news:ey****************@TK2MSFTNGP11.phx.gbl...

I something like this:

dim mybytes() as byte = "hello world"

The string is ascii.

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.