Exemplo n.º 1
0
    public static string ToXml(this MXmlSerializable self)
    {
        if (self == null)
        {
            throw new ArgumentNullException();
        }
        var serializer = new XmlSerializer(self.GetType());

        using (var writer = new StringWriter()) {
            serializer.Serialize(writer, self);
            return(writer.GetStringBuilder().ToString());
        }
    }
Exemplo n.º 2
0
 public static string ToXml(this MXmlSerializable self)
 {
     // ...
 }