Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using IDisposable
Message
From
21/11/2008 16:34:46
 
 
To
21/11/2008 16:18:45
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Application:
Desktop
Miscellaneous
Thread ID:
01363570
Message ID:
01363573
Views:
9
Can you put it in the destuctor?

>Hi All,
>
>Ok, I have added a method to my class that I want to be sure is run anytime this class goes away. Since you are not supposed to put a call to a method in Dispose then there isn't a valid reason for me to implement IDisposable. I am reluctant to put a public method for this and expect any using class to NOT forget to call it.
>What is the right way to do this?
>Tim
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform