Ejemplo n.º 1
0
        public static XmlBuilder Build(Action<dynamic> builder)
        {
            if (builder == null)
            {
                throw new ArgumentNullException("builder");
            }

            var xbuilder = new XmlBuilder();

            builder(xbuilder);

            return xbuilder;
        }
Ejemplo n.º 2
0
        internal static void Main(string[] args)
        {
            dynamic xml = new XmlBuilder();

            xml.Declaration();

            xml.user("Kiro Zlatniq", new {
                id = 1,
                username = "******",
                age = 50
            });

            Console.WriteLine(xml.ToString(true));
        }