Results 1 to 2 of 2

Thread: getting a byte array

  1. #1

    Thread Starter
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950

    getting a byte array

    Is there a buil in function that will take a string and return a byte array?
    System.BitConverter.GetBytes only accepts a char. I want to pass in a string of x number of characters.

    Thanks,
    Don't anthropomorphize computers -- they hate it

  2. #2
    Fanatic Member -TPM-'s Avatar
    Join Date
    Jul 2005
    Posts
    850

    Re: getting a byte array

    Yes like this;
    System.Text.Encoding.ASCII.GetBytes(YourString)
    (you could use other text encoding, I just used ASCII for the example)
    TPM

    Add yourself to the VBForums Frappr Map!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width