Guest Imogen Posted August 27, 2002 Posted August 27, 2002 In VB.Net New() and Finalize() functions have replaced the Class_Initialize() and Class_Terminate() of VB6. However when I create the finalize function I get the line MyBase.Finalize() What do this mean/do? Taken from the VB.Net created routine Protected Overrides Sub Finalize() MyBase.Finalize() End Sub Thanks Imogen Quote
*Gurus* divil Posted August 27, 2002 *Gurus* Posted August 27, 2002 Your Finalize event is where you clean up objects in your class, but if your class derives from another, that line Invokes the Finalize method in *that* class as well, so it has a chance to clean up properly at the same time. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Guest Imogen Posted August 27, 2002 Posted August 27, 2002 so if you dont have a base class then it does nothing? Quote
*Gurus* divil Posted August 27, 2002 *Gurus* Posted August 27, 2002 I think if you don't specify a base class to inherit from, it will implicitly inherit from Object, so there will always be a base class. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.