Compartilhar via


Cláusula Implements (Visual Basic)

Indicates that a class or structure member is providing the implementation for a member defined in an interface.

Comentários

The Implements keyword is not the same as the Implementa Declaração. You use the Implements statement to specify that a class or structure implements one or more interfaces, and then for each member you use the Implements keyword to specify which interface and which member it implements.

If a class or structure implements an interface, it must include the Implements statement immediately after the Declaração Class (Visual Basic) or Instrução Structure, and it must implement all the members defined by the interface.

Reimplementation

In a derived class, you can reimplement an interface member that the base class has already implemented. This is different from overriding the base class member in the following respects:

  • The base class member does not need to be Overridable (Visual Basic) to be reimplemented.

  • You can reimplement the member with a different name.

The Implements keyword can be used in these contexts:

Declaração de evento

Instrução Function (Visual Basic)

Propriedade declaração

Instrução Sub (Visual Basic)

Consulte também

Referência

Implementa Declaração

Declaração Interface (Visual Basic)

Declaração Class (Visual Basic)

Instrução Structure