示例#1
0
        static void Main(string[] args)
        {
            var d1 = new Demo();

            Console.WriteLine(d1.Add(38, 4));
            Console.WriteLine(d1.Hello("Katharina"));

            d1.Hello2("Stephanie");
        }
示例#2
0
        protected override void Deserialize(XmlNode node)
        {
            base.Deserialize(node);
            foreach (XmlNode childNode in node.ChildNodes)
            {
                switch (childNode.Name)
                {
                case "SlideHeader":
                    SlideHeader = childNode.InnerText;
                    break;

                case "Demo":
                    Demo.Clear();
                    foreach (XmlNode valueNode in childNode.ChildNodes)
                    {
                        Demo.Add(valueNode.InnerText);
                    }
                    break;

                case "Income":
                    Income.Clear();
                    foreach (XmlNode valueNode in childNode.ChildNodes)
                    {
                        Income.Add(valueNode.InnerText);
                    }
                    break;

                case "Geographic":
                    Geographic.Clear();
                    foreach (XmlNode valueNode in childNode.ChildNodes)
                    {
                        Geographic.Add(valueNode.InnerText);
                    }
                    break;
                }
            }
        }