public void GetFieldInfosTest() { for (int i = 0; i < MaxTime; i++) { // var t= typeof(MyClass).GetFields(); var t = CTRCHelper.GetFieldInfos <MethodModel>(); //var t = string.Empty; } }
public void TestMethod1() { var fields = CTRCHelper.GetFieldInfos <TestEnum>(); //Console.WriteLine(fields.Length); foreach (var field in fields) { // if (field.Name == "value__") continue; // Console.WriteLine(Enum.Parse(typeof(TestEnum), field.Name)); var t = CTRCHelper.GetCustomAttributes <DescriptionAttribute>(field); //Console.WriteLine(t?.Description??"none"); } }