的Class1:處置例如
public class FunctionBlocks
{
List<Hashtable> _htLogicalNodeList;
public FunctionBlocks()
{
_htLogicalNodeList = new List<Hashtable>();
FunctionBlock fb = new FunctionBlock();
fb.AddDODASignalList(new Hashtable);
_htLogicalNodeList.Add(fb.LogicalNodeHash);
fb = null;
}
}
等級2:
public class FunctionBlock
{
Hashtable _htLogicalNode;
public FunctionBlock()
{
_htLogicalNode = new Hashtable();
}
public Hashtable LogicalNodeHash
{
get{return _htLogicalNode;}
set{_htLogicalNode = value;}
}
public void AddDODASignalList(Hashtable doDASignal)
{
_htLogicalNode.Add(doDASignal);
}
}
在這個例子中,我wan't處置 「_htLogicalNode」。 「fb」對象我已將它設置爲null,Eventhough「FunctionBlocks」實例具有「_htLogicalNode」引用。我如何處置「_htLogicalNode」實例。