Use the GetString method to convert a byte array into a String. : ASCIIEncoding « Development « VB.Net Tutorial






Imports System
Imports System.Text

Class ASCIIEncodingExample

    Public Shared Sub Main()
        Dim bytes() As Byte = { _
             65,  83,  67,  73,  73,  32,  69, _
            110,  99, 111, 110, 105, 110, 103, _
             32,  69, 120,  197, 109, 112, 108, 101}

        Dim ascii As New ASCIIEncoding()
        Dim decoded As String = ascii.GetString(bytes)
        Console.WriteLine(decoded)
    End Sub
End Class








7.30.ASCIIEncoding
7.30.1.Use the GetString method to convert a byte array into a String.