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 277 views
1 answer 355 views
1 answer 332 views
1 answer 299 views
1 answer 237 views
...