【发布时间】:2013-09-30 09:59:14
【问题描述】:
一个很简单的问题,但是我25分钟google都找不到好的答案~
我想引用一个存储在名为(字符串)的字段中的对象~
有点像~
private string ButtonName;
public ActionPanel ActionPanel;
private object reference;
void main(){
ActionPanel = new ActionPanel();
reference = ActionPanel.ChangeSelectedActionBundle.(ButtonName);
}
我假设我需要使用反射,但我不太确定这样做的正确方法:(
【问题讨论】:
标签: c# string reflection casting reference