Basic samples. Interface types.



Interface IMyInterface
  Sub P(X As Integer, Y As Integer)
End Interface

Class TMyClass

  Inherits TInterfacedObject, IMyInterface

  Sub P(X As Integer, Y As Integer)
    println Me.ClassName
    println X, " ", Y
  End Sub

  Sub Finalize
    println "Done"
    MyBase.Destroy
  End Sub

End Class

Dim X As TMyClass = New TMyClass
Dim I As IMyInterface = X
I.P(3, 4)



Copyright © 2006-2017 Alexander Baranovsky. All rights reserved.