Define interface 1

xiaoxiao2021-03-06  58

The second section definition interface From the technical report, the interface is a set of data structures containing the function type method. With this set of data structures, customer code can call the functionality of the component object.

The general form of defining the interface is:

[attributes] [Modifiers] Interface Identifier [: Base-list] {interface-body} [;]

Description: 1. Attributes: Additional definition information. 2, Modifiers: Allows the modifiers that are used with NEW and four access modifiers. They are: New, Public, Protected, Internal, Private. In an interface definition, the same modifier does not allow multiple times, the New modifier can only appear in the nested interface, indicating that the same name member of the inheritance comes. The public, protected, both, and private modifiers define access to the interface. 3, indicators and events. 4, Identifier: Interface name. 5, base-list: Contains a list of one or more explicit base ports, and the interface is separated by a comma. 6, Interface-Body: Definition of the interface member. 7, the interface can be a member of the namespace or class, and can include the signature of the following members: method, attribute, indexer. 8, one interface can be inherited from one or more base ports.

转载请注明原文地址:https://www.9cbs.com/read-83899.html

New Post(0)