ObservableCollection wrapper to cast to a base type
问题 I have a class called Client , which is a subclass of Configurable . I have an ObservableCollection<Client> which I need to view as an ObservableCollection<Configurable> . This will allow me to databind to the list from some general layout generation code. It must also allow me to clear the list, and to add items to the list. Of course, when adding items to the list it must do a runtime type check to verify the general item ( Configurable ) being added is of the appropriate type ( Client ). I