protected override void WriteImpl(MetadataWriter mw) { mw.Write((byte)0); foreach (string str in list) { mw.WriteCompressedUInt(str.Length * 2 + 1); byte hasSpecialChars = 0; foreach (char ch in str) { mw.Write((ushort)ch); if (hasSpecialChars == 0 && (ch < 0x20 || ch > 0x7E)) { if (ch > 0x7E || (ch >= 0x01 && ch <= 0x08) || (ch >= 0x0E && ch <= 0x1F) || ch == 0x27 || ch == 0x2D) { hasSpecialChars = 1; } } } mw.Write(hasSpecialChars); } }