I have a byte[] array that is loaded from a file that I happen to known contains UTF-8.
byte[]
In some debugging code, I need to convert it to a string. Is
Definition:
public static string ConvertByteToString(this byte[] source) { return source != null ? System.Text.Encoding.UTF8.GetString(source) : null; }
Using:
string result = input.ConvertByteToString();