Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27336

VS 2008 Put string to a Byte() ?

$
0
0
Hi !
I need a fast help, i have a string like "&HC5" and i ned to put it to a Byte() (it will be byte C5 because it needs to be hex) when i just make it like this:
Code:

            Dim mystring = "&HC5"
            Dim myByte As Byte() = mystring

It returns a error 'Value of type 'String' cannot be converted to '1-dimensional array of Byte'
Of course im not setting the byte in the code, then i would just make it &HC5 in myByte variable, but im getting the byte from textbox and then adding &H to it ("&H" + TextBox1.Text etc)

Viewing all articles
Browse latest Browse all 27336

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>