Format:
Recent snippets matching tags of serialization
public XDocument ResponseXml { get; protected set; } public T Inflate<T>() where T : class { var attr = typeof(T) .GetCustomAttributes(true) .OfType<XmlRootAttribute>() .SingleOrDefault(); string root = attr.ElementName;
146 Views
no comments
'Form1.vb #Region " Import Declaratives " Imports DevExpress.XtraEditors Imports DevExpress.Utils.Menu Imports System.IO Imports System.Xml.Serialization #End Region
2635 Views
no comments
Serialize (convert an object instance to an XML document): // Assuming obj is an instance of an object XmlSerializer ser = new XmlSerializer(obj.GetType()); System.Text.StringBuilder sb = new System.Text.StringBuilder(); System.IO.StringWriter writer = new System.IO.StringWriter(sb); ser.Serialize(writer, obj); XmlDocument doc = new XmlDocument(); doc.LoadXml(sb.ToString());
265 Views
no comments
/// <summary> /// Static class that provides services to serialize and deserialize an IDynamiteXml. /// </summary> public static class DynamiteXmlLogic { /// <summary> /// Service to serialize an IDynamiteXml implementing object. /// Use the Deserialize method of this class to get the IDynamiteXml back. /// </summary> /// <param name="DynamiteXml">
213 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
