Question: How do I convert a string from a textbox into hexadecimal?

I have only found ways in C#. Does VB.NET have the ability to do such a thing? If it can then I'd like to know how to convert string to hex and hex to string.

Answer: 
```
Dim val As String
val = "10"
Dim hexVal As Integer
hexVal = Convert.ToInt32(val, 16) //16 specifies the base
Console.WriteLine(hexVal)

```

This will display 16 which is the integer equivalent of the hexadecimal string "10".
```
Public Function StrToHex(ByRef Data As String) As String
    Dim sVal As String
    Dim sHex As String = ""
    While Data.Length > 0
        sVal = Conversion.Hex(Strings.Asc(Data.Substring(0, 1).ToString()))
        Data = Data.Substring(1, Data.Length - 1)
        sHex = sHex & sVal
    End While
    Return sHex
End Function

```