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