public static string ReadUTF8String(CLRSignatureParser parser) { byte firstByte = parser.NextByte(); if (firstByte == 0xff) return null; else { uint stringLengthBytes = parser.ReadCompressedUInt(); if (stringLengthBytes == 0) return ""; else { byte[] utf8chars = new byte[stringLengthBytes]; parser.ReadBytes(utf8chars, stringLengthBytes); return System.Text.Encoding.UTF8.GetString(utf8chars); } } }