VB6实现中的Class_Terminate

时间:2011-01-21 08:40:52

标签: class vb6

继续这个问题Does a VB6 class have a destructor?之后,我试图在实现接口的类中创建一个Class_Terminate方法。但是由于方法名称

,我找不到任何方法来编译它
MyImplementation_Class_Terminate

perforce包含一个下划线字符,实现方法名称中没有该字符(根据此http://msdn.microsoft.com/en-us/library/aa262287(VS.60).aspx)。

有谁知道我该怎么做才能让它发挥作用?

1 个答案:

答案 0 :(得分:5)

Class_Terminate方法不是界面的一部分。

''In class MyInterface
Public Sub Method()  '' method on the interface
End Sub 

''In class MyImplementation
Implements MyInterface 
Private Sub MyInterface_Method() 
End Sub

Private Sub Class_Terminate()
End Sub