protected override XmlSchema GetSchemaSerializable() { MemoryStream stream = new MemoryStream(); WriteXmlSchema(new XmlTextWriter(stream, null)); stream.Position = 0; return XmlSchema.Read(new XmlTextReader(stream), null); }