Convert byte array To Base 64 String - CSharp System

CSharp examples for System:Converter

Description

Convert byte array To Base 64 String

Demo Code


using System.Text;
using System.IO;/*www  . j a  v a  2  s .c om*/
using System;

public class Main{
        public static string ToBase64String(
            byte[] data,
            int off,
            int length)
        {
            return Convert.ToBase64String(data, off, length);
        }
        public static string ToBase64String(
            byte[] data)
        {
            return Convert.ToBase64String(data, 0, data.Length);
        }
}

Related Tutorials