Create a generic collection of derived interfaces from a collection of base interfaces
问题 I have a base interface public interface IBase { ... } and a interface that derives from this base public interface IChild : IBase { ... } Within my code, I call a method which will return me a List<IBase> (legacy code). With this List I am trying to fill a ObservableCollection<IChild> : List<IBase> baseList= GetListofBase(); ChildList = new ObservableCollection<IChild>(); // how to fill ChildList with the contents of baseList here? I know it is not possible to cast from a base to a derived