An interface defines a contract. A class or struct that implements an
interface must adhere to its contract. An
interface may inherit from multiple base interfaces, and a class or struct
may implement multiple interfaces.
Interfaces can contain methods, properties, events, and indexers. The
interface itself does not provide
implementations for the members that it defines. The interface merely
specifies the members that must be
supplied by classes or interfaces that implement the interface.
interface must adhere to its contract. An
interface may inherit from multiple base interfaces, and a class or struct
may implement multiple interfaces.
Interfaces can contain methods, properties, events, and indexers. The
interface itself does not provide
implementations for the members that it defines. The interface merely
specifies the members that must be
supplied by classes or interfaces that implement the interface.
接口定义了一种契约,实现接口的类或结构必须遵循此契约。接口可以继承多个基接口,并且一个类或结构可以实现多个接口。接口可以包含方法、属性、事件和索引器,但自身不提供成员的具体实现。
1542

被折叠的 条评论
为什么被折叠?



