Converts the byte array to a Base64 encoded string using - CSharp System

CSharp examples for System:Byte Array

Description

Converts the byte array to a Base64 encoded string using

Demo Code


using System;/*from   ww  w.ja va  2 s .c  o m*/

public class Main{
        /// <summary>
        /// Converts the byte array to a Base64 encoded string using <see cref="Convert.ToBase64String(byte[])"/>
        /// </summary>
        /// <param name="bytes">the bytes to convert</param>
        /// <returns>A string</returns>
        public static string ToBase64String(this byte[] bytes)
        {
            Check.NotNull(bytes);
            return Convert.ToBase64String(bytes);
        }
}

Related Tutorials