What is the alternative to `Collection<T>`, for Windows Store apps?
-
29-06-2021 - |
Question
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow