myHashtable.Add(mykey,myObject)——如何把引用传递到myObject中?
private Hashtable processInstList;
public static bool AddProcessInstToList( ProcessInstManager piManager)
{
try
{
processInstList.Add(piManager.ToString(), piManager);
}
catch(Exception e)
{
MessageBox.Show(e.ToString());
}
启动时出错:NullReferenceException,未将对象引用设置到对象实例。
我该怎么办呢?
谢谢!