How do I convert string to array of byte?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • aurora

    How do I convert string to array of byte?


    I something like this:

    dim mybytes() as byte = "hello world"

    The string is ascii.
  • Mythran

    #2
    Re: How do I convert string to array of byte?

    Dim bytes As Byte()
    Dim text As String = "hello world"
    Dim b As Byte
    bytes = System.Text.ASC IIEncoding.ASCI I.GetBytes(text )

    Hope it helps :)

    Mythran

    "aurora" <spam> wrote in message news:eyXYy3%23n EHA.3868@TK2MSF TNGP11.phx.gbl. ..[color=blue]
    >
    > I something like this:
    >
    > dim mybytes() as byte = "hello world"
    >
    > The string is ascii.[/color]


    Comment

    Working...