Jump to content

Base64 decode data: Difference between revisions

Line 223:
To err is human, but to really foul things up you need a computer.
--Paul R.Ehrlich</pre>
 
=={{header|C#|C_sharp}}==
{{trans|Visual Basic .NET}}
<lang csharp>using System;
using System.Text;
 
namespace Base64DecodeData {
class Program {
static void Main(string[] args) {
var data = "VG8gZXJyIGlzIGh1bWFuLCBidXQgdG8gcmVhbGx5IGZvdWwgdGhpbmdzIHVwIHlvdSBuZWVkIGEgY29tcHV0ZXIuCiAgICAtLSBQYXVsIFIuIEVocmxpY2g=";
Console.WriteLine(data);
Console.WriteLine();
 
var decoded = Encoding.ASCII.GetString(Convert.FromBase64String(data));
Console.WriteLine(decoded);
}
}
}</lang>
{{out}}
<pre>VG8gZXJyIGlzIGh1bWFuLCBidXQgdG8gcmVhbGx5IGZvdWwgdGhpbmdzIHVwIHlvdSBuZWVkIGEgY29tcHV0ZXIuCiAgICAtLSBQYXVsIFIuIEVocmxpY2g=
 
To err is human, but to really foul things up you need a computer.
-- Paul R. Ehrlich</pre>
 
=={{header|D}}==
1,452

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.