How to encode a string into byte array with Encoding.ASCII.GetBytes in VB.NET

1 Answer

0 votes
Imports System.Text

Module Module1

    Sub Main()

        Dim array() As Byte = Encoding.ASCII.GetBytes("vb.net")

        For Each code As Byte In array
            Console.WriteLine(code)
        Next

    End Sub

End Module


' run:
' 
' 118
' 98
' 46
' 110
' 101
' 116

 



answered Oct 2, 2018 by avibootz

Related questions

1 answer 180 views
1 answer 250 views
1 answer 216 views
1 answer 202 views
1 answer 157 views
...