If I wanted to create a method that takes an instance of IList
as a parameter (or any other interface, but let\'s use IList
as an example), I could cre
Simple :
here you gave a pretty easy example : since you already gave the top interface ILIST.
but ,
lets say i have an instanc Of Objects.
JimMorrison
JohnLennon
SnowieWhite
they are all from ILegends
.
they are all singers objects ( var singer = new Singer())
YokOno
is also a singer but not Ilegends
( mmmm ... wonder why?)
and your function can take Singer
.
but you want to make sure that only ILegeneds will be valid... so here is your answer.