This sample encodes and decodes data in memory with the Base64 encoding format
C# |
Copy Code |
XceedBinaryEncodingLib.XceedBinaryEncoding encoder = new XceedBinaryEncodingLib.XceedBinaryEncodingClass();
encoder.License( @"your license key" );
try { encoder.EncodingFormat = new XceedBinaryEncodingLib.XceedBase64EncodingFormatClass();
object source = "This is the data to encode";
// Encode the data object encodedData = encoder.Encode( ref source, true );
// Decoded the data object decodedData = encoder.Decode( ref encodedData, true );
MessageBox.Show( System.Text.Encoding.Unicode.GetString( ( byte[] )decodedData ) ); } catch( System.Runtime.InteropServices.COMException except ) { MessageBox.Show( except.ToString() ); } |