Vai2000,
By DTOR, I assume you mean destructor.
If you want to have specific resources released at a specified time,
then you should implement the IDisposable interface, which indicates that
your class should be disposed of when done. Check out the section of the
.NET framework documentation titled "Implementing Finalize and Dispose to
Clean Up Unmanaged Resources", located at (watch for line wrap):
http://msdn.microsoft.com/library/d.../en-us/cpgenref/html/cpconFinalizeDispose.asp
It shows how to implement IDisposable for your base class, and your
derived classes as well.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Vai2000 said:
If I want to write my own DTOR in C# what method will it be? I know DTOR's
are not supported in C# but I want something like DTOR in C++ in my C#
Module. How to accomplish that?
TIA