IsDisposed

  • Thread starter Thread starter Peter Bladh
  • Start date Start date
Are you implementing your own Dispose method? If so, basically what you do
is add a boolean variable to your class that indicates whether or not the
Dispose method has been invoked already. Take a look at the VS.NET 2003
help: IDisposable.Dispose method for some sample code and an explanation.
 
You can check if the object is null (Nothing in VB.NET). Alternativately,
you can use the Try... Catch exception handling and catch an exception type
of ObjectDisposedException

HTH
Neil
 
Back
Top