继续这个问题Does a VB6 class have a destructor?之后,我试图在实现接口的类中创建一个Class_Terminate方法。但是由于方法名称
,我找不到任何方法来编译它MyImplementation_Class_Terminate
perforce包含一个下划线字符,实现方法名称中没有该字符(根据此http://msdn.microsoft.com/en-us/library/aa262287(VS.60).aspx)。
有谁知道我该怎么做才能让它发挥作用?
答案 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