V
Varangian
Hello, there
I have a problem with regards to System.Collections.Generic.List<T>
I need to pass a class with implements an interface - TestClass :
IPerson
I put this class in a List<TestClass> = new List<TestClass>();
then I pass this List<TestClass> to a function which takes an argument
List<IPerson> person
It's giving me an error, that it cannot convert from List<TestClass> to
IPerson, how is this possible?
what I'm missing and doing wrong ? anyone knows what should I do to
pass that List<TestClass> ?
I have a problem with regards to System.Collections.Generic.List<T>
I need to pass a class with implements an interface - TestClass :
IPerson
I put this class in a List<TestClass> = new List<TestClass>();
then I pass this List<TestClass> to a function which takes an argument
List<IPerson> person
It's giving me an error, that it cannot convert from List<TestClass> to
IPerson, how is this possible?
what I'm missing and doing wrong ? anyone knows what should I do to
pass that List<TestClass> ?