Is an abstract interface type class?

In my folder / interfaces I put all my interfaces.

Is an abstract class an interface type?

+3
source share
5 answers

In C #, interfaces are different from classes (even abstract classes);

  • Interfaces can define APIs (method signatures, event declarations, property declarations) rather than an implementation (fields, method bodies, etc.).
  • you can only inherit one base class, but you can implement multiple interfaces

But they have similarities in some applications - for example, when used in an abstract implementation of a factory.

+10
source

, , , . .

, - , .

IDisposable " , "; -, , .

, Animal, . , "", - , , , . , .

+14

. . , . () , . , . , , .

+5

. -, , .

+2

, ?

+1

Source: https://habr.com/ru/post/1723714/


All Articles