我很少有嵌套类,例如“BlueprintsManager.WorkingStandardBlueprint”,以及具有它们实例的 ArrayList。我想将它们作为参数传递给方法,例如:
private void ShowBlueprints(string class_str, ArrayList class_array)
{
// class_str would be passed as "BlueprintsManager.WorkingStandardBlueprint"
// how here I can access class_str as a class and cast class_array to it, to access some variables.
// for example, I need to access some BlueprintsManager.WorkingStandardBlueprint public variables.
}
我在搞乱反射,泛型,但我仍然无法让它工作。
谢谢你。