C#编程经验

学海无涯 / 2023-08-25 / 原文

反射得到属于的值:

var type = myTechs.GetType();
tech myTech = type.GetProperty(techName).GetValue(myTechs) as tech;

属于名:techName