private static string Parse_String(byte[] buffer, int offset, int strlen) { char[] asciiChars = new char[Encoding.ASCII.GetCharCount(buffer, offset, strlen)]; Encoding.ASCII.GetChars(buffer, offset, strlen, asciiChars, 0); return new string(asciiChars); }