我和 MyClass

使用当前的对象实例。

MyClass 使用调用成员的类中的 memberdefinition

Class Person
    Public Overridable Sub DoSomething()
        Console.WriteLine("Person")
    End Sub

    Public Sub useMe()
        Me.DoSomething()
    End Sub

    Public Sub useMyClass()
        MyClass.DoSomething()
    End Sub
End Class

Class Customer
    Inherits Person

    Public Overrides Sub DoSomething()
        Console.WriteLine("Customer")
    End Sub
End Class

用法示例:

Dim c As New Customer
c.useMe()
c.useMyClass()

输出:

Customer
Person