Name

Interface Statement

Syntax

[accessmodifier ] Interface name
...statements
End Interface
accessmodifier

Use: Optional

Type: Keyword

One of the following keywords, which determines the visibility of the interface:

Public

Use: Optional

Type: Keyword

Indicates that the interface is publicly accessible anywhere both inside and outside of the project

Private

Use: Optional

Type: Keyword

Indicates that the interface is accessible to any nested types, as well as to the type (if any) in which it is defined

Protected

Use: Optional

Type: Keyword

Indicates that the interface is accessible only to derived classes; a protected interface can only be declared inside of a class.

Friend

Use: Optional

Type: Keyword

Indicates that the interface is accessible only within the project that contains the interface definition

Protected Friend

Use: Optional

Type: Keyword

Indicates that the interface is declard inside of a class and that it is accessible throughout the project that contains the interface definition, as well as to derived classes

Shadows

Use: Optional

Type: Keyword

Indicates that the interface shadows an identically named element in a base class

name

Use: Required

Type: String literal

The name of the interface

statements

Use: Required

Code that defines the interface members that derived classes must implement

Description

Defines a virtual base class along with its public members. The interface can then be implemented by derived classes using the Implements statement.

Rules at a Glance

  • The standard naming ...

Get VB .NET Language in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.