我正在使用Thread.Join在新线程中启动一些功能。
不幸的是,我的代码的某个部分出现了运行时错误,下面是错误信息:
IBuyerRequest NewRequest(string className)
{
className.ThrowNullOrEmpty("className");
var type = Type.GetType(string.Format("MyApplication.BLL.PingtreeEngine.Requests.{0}Request", className));
object[] args = { _appForm };
type.ThrowNull("type");
var instance = Activator.CreateInstance(type, args) as IBuyerRequest;
return instance;
}
Activator.CreateInstance 导致了一个错误,该错误为“目标调用引发了异常”。
有人有任何想法如何可能解决这个问题吗?