Is it possible to implement polymorphism using an interface in C #?

Can we implement polymorphism using an interface in C #? any example.

+3
source share
1 answer

Yes.

eg. See how many collections in the structure implement IList<T>, so code that depends only on this interface can use any of these collections.

+5
source

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


All Articles