Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IDisposable Mysteries
Message
From
05/04/2011 16:24:32
 
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:
01506176
Views:
52
Although it doesn't explicitly implement the interface, it still implements the pattern. In other words, your finalize still calls the dispose method to clear any resources used by Excel.

Implementing the interface might be more important in C# than it is in VB. In C#, you would need to implement it to use the "using" keyword:
using (clsExcel myExcelObj = new clsExcel())
{
// Automation code goes here
}
This will limit the lifetime of the myExcelObj so that its resources are released at the end of the using block instead of waiting for garbage collection to take care of it at some indeterminate time in the future. I don't know if there is an equivalent command in VB.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform