CSharp examples for System:String Base64
Decodes a given base-64 encoded string encoded with .
// Copyright ? 2011, Grid Protection Alliance. All Rights Reserved. using System.Text.RegularExpressions; using System.Text; using System.IO;//from ww w. jav a 2 s . c om using System.Globalization; using System.ComponentModel; using System.Collections.Generic; using System; public class Main{ /// <summary> /// Decodes a given base-64 encoded string encoded with <see cref="Base64Encode" />. /// </summary> /// <param name="value">Input string.</param> /// <remarks>Note: This function decodes value back into a "String". Use the Convert.FromBase64String function to decode a base-64 encoded /// string back into a binary data buffer.</remarks> /// <returns>A <see cref="String"></see> value representing the decoded input of <paramref name="value"/>.</returns> public static string Base64Decode(this string value) { return Encoding.Unicode.GetString(Convert.FromBase64String(value)); } }