i write a code in c# that create an object but i cant dispose it
code :
private void button1_Click(object sender, EventArgs e)
{
Tnode tree = new Tnode();
tree.Dispose();
}
my class
class Tnode : IDisposable
{
public Tnode Parent;
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
}
}
how can i dispose this object after create.
this code not work correctly.
2006-06-09
07:33:13
·
1 answers
·
asked by
leal_boy
1
in
Computers & Internet
➔ Programming & Design