示例#1
0
 public void MyTestMethod()
 {
     var c = new UnitTest1.c { I = 1, S = "mys" };
     var htmlAttributes = new { a = 1, b = 2, c = 3, style = "display:none;", c.I, c.S };
     foreach (PropertyDescriptor propertyDescriptor in TypeDescriptor.GetProperties(htmlAttributes))
     {
         Console.WriteLine(propertyDescriptor.Name + "==>" + propertyDescriptor.GetValue(htmlAttributes));
     }
 }
示例#2
0
        public void MyTestMethod()
        {
            var c = new UnitTest1.c {
                I = 1, S = "mys"
            };
            var htmlAttributes = new { a = 1, b = 2, c = 3, style = "display:none;", c.I, c.S };

            foreach (PropertyDescriptor propertyDescriptor in TypeDescriptor.GetProperties(htmlAttributes))
            {
                Console.WriteLine(propertyDescriptor.Name + "==>" + propertyDescriptor.GetValue(htmlAttributes));
            }
        }