MyBase

Provides a way to refer to the base class of the current class instance.

Remarks

The MyBase keyword behaves like an object variable referring to the base class of the current instance of a class. MyBase is commonly used to access base class members that are overridden or shadowed in a derived class. In particular, MyBase.New is used to explicitly call a base class constructor from a derived class constructor.

It is invalid to use MyBase to call MustOverride base methods.

For more information and an example, see How to: Access a Variable Hidden by a Derived Class.

See Also

Concepts

Inheritance Basics

Reference

Me

MyClass

New (Visual Basic)