Get bytes or chars (VB) : Encoding « Development « ASP.NET Tutorial






<%@ Page %>
<script language="vb" runat="server">
  Sub Page_Load(sender As Object, e As EventArgs)
    Dim i As Integer
    Dim myBytes As Byte() = System.Text.Encoding.ASCII.GetBytes("Hello World")
    For i=0 to myBytes.Length-1
      Response.Write(myBytes(i).ToString() & " ")
    Next i
    Dim myChars as Char() = System.Text.Encoding.ASCII.GetChars(myBytes)
    Dim myString as String = New String(myChars)
    Response.Write("<BR>" & myString)
  End Sub
</script>
<html>
  <body>
    <form id="form1" method="post" runat="server">
    </form>
  </body>
</html>








9.15.Encoding
9.15.1.Get bytes or chars (C#)
9.15.2.Get bytes or chars (VB)