public void WriteXML(XmlWriter writer) { writer.WriteElementString("CameraType", CameraType); writer.WriteElementString("Identifier", Identifier); writer.WriteElementString("Alias", Alias); writer.WriteElementString("Icon", XmlHelper.WriteBitmap(Icon)); string displayRectangle = string.Format("{0};{1};{2};{3}", DisplayRectangle.X, DisplayRectangle.Y, DisplayRectangle.Width, DisplayRectangle.Height); writer.WriteElementString("DisplayRectangle", displayRectangle); writer.WriteElementString("AspectRatio", AspectRatio); if (!string.IsNullOrEmpty(Specific)) { writer.WriteStartElement("Specific"); writer.WriteRaw(Specific); writer.WriteEndElement(); } }