It couldn't be easier.
Public Function ToBase64(ByVal data() As Byte) As String
If data Is Nothing Then Throw New ArgumentNullException("data")
Return Convert.ToBase64String(data)
End Function
Public Function FromBase64(ByVal base64 As String) As Byte()
If base64 Is Nothing Then Throw New ArgumentNullException("base64")
Return Convert.FromBase64String(base64)
End Function
The code will work in VB.Net 2005 as well as earlier versions.If you want to do Base 64 encoding/decoding using Visual Basic 6
17 comments,
VB.Net, Monday, February 28, 2005 14:47


