public override XmlNode ToXml(XmlDocument doc) { XmlNode result = base.ToXml(doc); XmlNode node = doc.CreateElement("ReturnType"); node.AppendChild(returnType.ToXml(doc)); result.AppendChild(node); XmlAttribute nameAttr = doc.CreateAttribute("Name"); nameAttr.Value = name; result.Attributes.Append(nameAttr); result.AppendChild(args.ToXml(doc)); node = doc.CreateElement("Body"); node.AppendChild(body.ToXml(doc)); result.AppendChild(node); return(result); }