Beh ... perche' due cicli for visto che te ne ho indicato uno solo?
codice:
Dim sd As String, sa As String
Dim i As Integer, j As Integer
sd = "6369616F"
Dim b() As Byte = New Byte(sd.Length / 2) {}
j = 0
For i = 0 To sd.Length - 1 Step 2
b(j) = CType(UShort.Parse(sd.Substring(i, 2), System.Globalization.NumberStyles.HexNumber), Byte)
j = j + 1
Next
sa = System.Text.Encoding.UTF8.GetString(b, 0, b.Length)
RichTextBox2.Text = sa
o piu' semplicemente
codice:
Dim sd As String, sa As String
Dim i As Integer
sd = "6369616F"
sa = ""
For i = 0 To sd.Length - 1 Step 2
sa += Chr(UShort.Parse(sd.Substring(i, 2), System.Globalization.NumberStyles.HexNumber))
Next
RichTextBox2.Text = sa