does anyone have any idea about how to convert a byte array to a string in C#?
Printable View
does anyone have any idea about how to convert a byte array to a string in C#?
Here you go:
You can also use the UnicodeEncoding class when dealing with the unicode character set.Code:byte[] bytes = {(byte)'H', (byte)'E', (byte)'L', (byte)'L', (byte)'O'};
Console.WriteLine(System.Text.ASCIIEncoding.ASCII.GetString(bytes));