0
点赞
收藏
分享

微信扫一扫

promise 是什么?它有哪些作用?

余寿 2024-01-07 阅读 15

接口 (interface) 定义了一个可由类和结构实现的协定。接口可以包含方法、属性、事件和索引器。接口不提供它所定义的成员的实现 — 它仅指定实现该接口的类或结构必须提供的成员。
接口可支持多重继承。在下面的示例中,接口 IComboBox 同时从 ITextBox 和 IListBox 继承。

interface IControl
{
   
    void Paint();
}

interface ITextBox : IControl
{
   
    void SetText(string text);
}

interface IListBox : IControl
{
   
    void SetItems(string
举报

相关推荐

0 条评论