Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IDisposable Mysteries
Message
De
06/04/2011 21:01:28
 
 
À
06/04/2011 14:22:04
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 8.0
OS:
Vista
Network:
Windows XP
Database:
Jet/Access Engine
Application:
Desktop
Divers
Thread ID:
01506168
Message ID:
01506314
Vues:
53
>A class that implements IDisposable indicates to anything concerned that it should call Dispose(). This is, essentially, how the compiler translates the presence of a 'Using' block - if the created class implements IDisposable then it will automatically call Dispose() on that class at the end of the block.

And, in fact, it should be noted that if a class does not implement IDisposable, then you can't even have it in a using statement, you'll get a compiler error.

~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform