Search code examples
c#windows-8microsoft-metrowindows-store

What is the alternative to `Collection<T>`, for Windows Store apps?


Given List<T> is considered bad as a base class, and Collection<T> doesn't appear to be available in the subset of the framework available to Metro Windows Store applications, what base class should be used in place of Collection<T> to allow for extensibility, such as raising an event when an item is added or removed from the it?


Solution

  • Use the ICollection<T> interface.