Imports System
Imports System.Text
Imports Microsoft.VisualBasic.Strings
Class ASCIIEncodingExample
Public Shared Sub Main()
Dim ascii As New ASCIIEncoding()
Dim unicodeString As String = "Pi:" & ChrW(928) & " Sigma:" & ChrW(931) & "."
Console.WriteLine(unicodeString)
' Encode string.
Dim encodedBytes As Byte() = ascii.GetBytes(unicodeString)
Dim b As Byte
For Each b In encodedBytes
Console.Write("[{0}]", b)
Next b
End Sub
End Class