C# 这是什么意思,怎么称呼?类MyClass:某物,某物2{…}

C# 这是什么意思,怎么称呼?类MyClass:某物,某物2{…},c#,class,documentation,C#,Class,Documentation,我已经来过好几次了,但我不知道它叫什么,也不知道它是什么,它做什么 class MyClass : something, something2{ ... } 你能给我指一下正确的方向吗?一些文件等 谢谢。鉴于此示例场景: interface IComponent { void DoStuff(); } interface ITitledComponent : IComponent { string Title { get; } } abstract class Compon

我已经来过好几次了,但我不知道它叫什么,也不知道它是什么,它做什么

class MyClass : something, something2{ ... }
你能给我指一下正确的方向吗?一些文件等


谢谢。

鉴于此示例场景:

interface IComponent
{
    void DoStuff();
}

interface ITitledComponent : IComponent
{
    string Title { get; }
}

abstract class ComponentBase : IComponent
{
    public void DoStuff()
    {
        throw new NotImplementedException();
    }
}

class MyComponent : ComponentBase, ITitledComponent
{
    public string Title => throw new NotImplementedException();
}

类MyComponent:ComponentBase,ITitledComponent
表示类
MyComponent
必须继承类
ComponentBase
并实现接口
ITitledComponent
及其所有内部定义。

给定此示例场景:

interface IComponent
{
    void DoStuff();
}

interface ITitledComponent : IComponent
{
    string Title { get; }
}

abstract class ComponentBase : IComponent
{
    public void DoStuff()
    {
        throw new NotImplementedException();
    }
}

class MyComponent : ComponentBase, ITitledComponent
{
    public string Title => throw new NotImplementedException();
}

类MyComponent:ComponentBase,ITitledComponent
表示,类
MyComponent
必须继承类
ComponentBase
,并实现接口
ITitledComponent
及其所有内部定义。

我的建议-从OOP中的继承开始阅读你的意思是什么,它叫继承?我认为您开始从错误的方向探索语言。冒号指向继承,并且事实上接口后面有两个名称(因为C#没有多重继承)。但是,本网站不提供基本语言元素的教程或介绍。好的,谢谢。我在找“继承”这个词。谢谢。我的建议-从阅读OOP中的继承开始,你的意思是什么,它叫什么,继承?我认为您开始从错误的方向探索语言。冒号指向继承,并且事实上接口后面有两个名称(因为C#没有多重继承)。但是,本网站不提供基本语言元素的教程或介绍。好的,谢谢。我在找“继承”这个词。谢谢