BindingList

Patrick Altman reminded me of a question I raised on the [aus-dotnet] list several weeks ago, regarding inheriting from BindingList rather than List. BindingList is designed for data binding and data changed event notifications. If you derive from List and you want to be notified when someone changes the collection, you will have to implement this yourself. David Kean has an excellent blog post on this subject and why FxCop encourages exposing Collection over List here.

The reason I mention this is because at a company where I was working recently, the programmer responsible for writing framework code was not aware of this. Thanks to David Kean, Bill McCarthy, Paul Stovell and Mitch Denny for their input.