VB.Net Tutorial/Data Type/Base64String
Версия от 16:40, 26 мая 2010; (обсуждение)
Convert string to base64string
Public Class Tester
Public Shared Sub Main
Dim quote As String = "AAAAA"
Dim quoteBytes As Byte() = System.Text.Encoding.UTF8.GetBytes(quote)
Dim quote64 As String = Convert.ToBase64String(quoteBytes)
Dim byteSet As Byte() = Convert.FromBase64String(quote64)
Dim result As String = System.Text.Encoding.UTF8.GetString(byteSet)
Console.WriteLine(quote & vbNewLine & quote64 & vbNewLine & result)
End Sub
End Class
AAAAA QUFBQUE= AAAAA