If I create a new ObservableCollection<T>
, and a CollectionChanged
listener as follows:
var c = new ObservableCollection<MyType>();
c.CollectionChanged += new NotifyCollectionChangedEventHandler(h);
...
void h(object sender, NotifyCollectionChangedEventArgs e)
{
IList newItems = e.NewItems;
// non generic IList! :(
}
Why isn't e.NewItems
an IList<MyType>
?