Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can we implement polymorphism using interface in c#?

Tags:

c#

interface

can we implement polymorphism using interface in c#? any example .

like image 391
Azhar Avatar asked Dec 08 '25 15:12

Azhar


1 Answers

Yes.

E.g. See the way many collections in the framework implement IList<T> so code that only depends on that interface can use any of those collections.

like image 119
Richard Avatar answered Dec 10 '25 03:12

Richard



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!