Why do both the abstract class and interface exist in C#?

前端 未结 11 1953
渐次进展
渐次进展 2020-12-03 00:00

Why do both the abstract class and interface exist in C# if we can achieve the interface feature by making all the members in the class as abstract.

Is it because:

11条回答
  •  庸人自扰
    2020-12-03 00:34

    Interfaces exist to provide a class without any implementation whatsoever, so that .NET can provide support for safe and functional multiple inheritance in a managed environment.

提交回复
热议问题