I know that I can remove an object from my own type of type in my own way like this:
IMyInterface myValue = (IMyInterface) MyObjectThatImplementsMyInterface;
I IList to IList & lt; IMyInterface & gt;
IList to IList & lt; IMyInterface & gt;
IList & lt; IMyInterface & gt;
How do I put I answered the same question though For base classes instead of interface. How to make this work the list and elements inserted can be done using the Converted Around: IList & lt; A & gt; ListOfA = new list & lt; C & gt; (). ConvertAll (x = & gt; (A) x); You can also use the link: IList & lt; A & gt; ListOfA = new list & lt; C & gt; (). Cast & lt; A & gt; (). ToList ();
How do I put
I answered the same question though For base classes instead of interface.
How to make this work the list and elements inserted can be done using the Converted Around:
IList & lt; A & gt; ListOfA = new list & lt; C & gt; (). ConvertAll (x = & gt; (A) x);
You can also use the link:
IList & lt; A & gt; ListOfA = new list & lt; C & gt; (). Cast & lt; A & gt; (). ToList ();
No comments: Post a Comment
Newer Post Older Post Home Subscribe to: Post Comments (Atom)
No comments:
Post a Comment