It might be helpful,
class Program
{
static void Main(string[] args)
{
byte[] myBytes = Encoding.ASCII.GetBytes("Hello World");
Console.WriteLine(GetString(myBytes));
}
private static String GetString(byte[] myBytes)
{
StringBuilder builder = new StringBuilder();
builder.Append("0x");
Array.ForEach(myBytes, item => builder.Append(item.ToString()));
return builder.ToString();
}
}
:)