Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IDisposable Mysteries
Message
From
06/04/2011 21:01:28
 
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 8.0
OS:
Vista
Network:
Windows XP
Database:
Jet/Access Engine
Application:
Desktop
Miscellaneous
Thread ID:
01506168
Message ID:
01506314
Views:
52
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform