Encode Utf8 base 64 String - CSharp System

CSharp examples for System:String Base64

Description

Encode Utf8 base 64 String

Demo Code


using System.Text;
using System;/*from   w w w  .  j av a 2  s  . c o m*/

public class Main{
        public static string EncodeUtf8(string rawStr)
        {
            byte[] strUtf8 = Encoding.UTF8.GetBytes(rawStr);
            return Convert.ToBase64String(strUtf8);
        }
}

Related Tutorials