Convert the Char array back to a Byte array
Class Sample
Public Shared Sub Main()
Dim byteArray1(255) As Byte
Dim byteArray2(255) As Byte
Dim charArray(351) As Char
Dim charArrayLength As Integer
Dim x As Integer
For x = 0 To byteArray1.Length - 1
byteArray1(x) = CByte(x)
Next x
charArrayLength = Convert.ToBase64CharArray( _
byteArray1, 0, byteArray1.Length, _
charArray, 0, _
Base64FormattingOptions.InsertLineBreaks)
byteArray2 = Convert.FromBase64CharArray(charArray, 0, charArrayLength)
End Sub
End Class
Related examples in the same category