打印对象:

            foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(obj))
            {
                string name = descriptor.Name;
                object val = descriptor.GetValue(obj);
                Console.WriteLine("name:{0}=value:{1}", name, val);
            }
View Code

相关文章:

  • 2021-05-04
  • 2021-11-25
  • 2021-08-29
猜你喜欢
  • 2022-01-30
  • 2022-12-23
  • 2021-06-16
  • 2021-06-27
  • 2021-08-14
  • 2021-08-13
相关资源
相似解决方案