这是什么意思,怎么称呼? class MyClass : something, something2{ ... }
What does that mean, how is it called? class MyClass : something, something2{ ... }
我已经解决过好几次了,但我不知道它是怎么称呼的,也不知道它是什么,它有什么作用。
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();
}
行 class MyComponent : ComponentBase, ITitledComponent
是说,class MyComponent
必须 继承 class ComponentBase
并使用其所有内部定义实现接口 ITitledComponent
。
我已经解决过好几次了,但我不知道它是怎么称呼的,也不知道它是什么,它有什么作用。
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();
}
行 class MyComponent : ComponentBase, ITitledComponent
是说,class MyComponent
必须 继承 class ComponentBase
并使用其所有内部定义实现接口 ITitledComponent
。