public static GetString ( byte bytes, int offset, int length ) : string | ||
bytes | byte | |
offset | int | |
length | int | |
return | string |
public static string GetString(byte[] bytes, int offset, int length)
{
try
{
return Encoding.UTF8.GetString(bytes, offset, length);
}
catch (IOException e)
{
throw new Exception("UTF-8 to string conversion failed: " + e.Message);
}
}