Decodes a Base64-encoded string - CSharp System

CSharp examples for System:String Base64

Description

Decodes a Base64-encoded string

Demo Code


using System.Text.RegularExpressions;
using System.Text;
using System.Linq;
using System.Globalization;
using System;/*from   ww  w . j a  v a2s.  c  om*/

public class Main{
        /// <summary>
		/// Decodes a Base64-encoded string
		/// </summary>
		public static string DecodeBase64(this string value)
		{
			return Encoding.ASCII.GetString(Convert.FromBase64String(value));
		}
}

Related Tutorials