Return to Snippet

Revision: 52092
at January 19, 2012 03:55 by roboninjapiratejesus


Updated Code
// Converting a Byte Array to a String object
using System.Text;

public byte[] ByteArrayToString(string str)
{
    return new ASCIIEncoding().GetString(str);
}

Revision: 52091
at October 13, 2011 02:43 by roboninjapiratejesus


Initial Code
// Converting a Byte Array to a String object
using System.Text;

public byte[] ByteArrayToString(string str)
{
    return new ASCIIEncoding().GetString(dBytes);
}

Initial URL


Initial Description
ASCIIEncoding class has another method, GetByte(), which does the opposite of this one.

Initial Title
Byte array to String in .Net 3.5

Initial Tags
array, c#

Initial Language
C#