Saturday, December 29, 2007

C#: Decode a string from Base64

public string DecodeBase64String(string encodedData)
{
byte[] encodedDataAsBytes = System.Convert.FromBase64String(encodedData);
string returnValue = System.Text.ASCIIEncoding.ASCII.GetString(encodedDataAsBytes);
return returnValue;
}

2 comments:

  1. Thanks. Unlike most other blogs, your way of coding is simple(and less blabbering) This is really useful. Keep up the good work!! \m/

    ReplyDelete

Please use your common sense before making a comment, and I truly appreciate your constructive criticisms.