Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using IDisposable
Message
De
21/11/2008 16:34:46
 
 
À
21/11/2008 16:18:45
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Application:
Desktop
Divers
Thread ID:
01363570
Message ID:
01363573
Vues:
8
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform