A
amaca
I have a class, MyClass, which implements two interfaces, IThis and IThat. I
have a list of that class implemented as a generic,
List myList = List<MyClass>.
Can I cast myList so that it looks like a List of IThis (which one chunk of
code needs) and as a List of IThat (which another chunk of code needs)?
I'm not sure whether I don't understand the syntax for casts or have
misunderstood how to implement Generics and Interfaces. Or have I just
designed and coded my way down a blind alley?
Andrew
have a list of that class implemented as a generic,
List myList = List<MyClass>.
Can I cast myList so that it looks like a List of IThis (which one chunk of
code needs) and as a List of IThat (which another chunk of code needs)?
I'm not sure whether I don't understand the syntax for casts or have
misunderstood how to implement Generics and Interfaces. Or have I just
designed and coded my way down a blind alley?
Andrew