🌈 搜索
📅  最后修改于: 2022-03-11 15:00:29.928000             🧑  作者: Mango
[Test] public void DoStuff() { List things = new List() { new ResultA(){Date = DateTime.Now, Month = 34}, new ResultB(){Count = 1, Jewels = 4, Number = "2", Update = "0"} }; foreach (var thing in things) { foreach (var property in thing.GetType().GetProperties()) { Trace.WriteLine(property.Name + " " + property.GetValue(thing)); } } }