Showing posts with label Interfaces. Show all posts
Showing posts with label Interfaces. Show all posts

Wednesday, November 3, 2010

Interfaces

Create the interface and define required behavior. An access specifier is not required.

Public Interface I_Test

    Function Foo() As String

End Interface

Implement the interface in the desired class:

Public MustInherit Class ShoppingListItem
    Implements I_Test

Now, implement the behaviors (you will have errors until you do):

          Public Function Foo() As String Implements I_Test.Foo
        Return "Foo"
    End Function