This post originated from an RSS feed registered with .NET Buzz
by Roy Osherove.
Original Post: Implementing CollectionBase the right way
Feed Title: ISerializable
Feed URL: http://www.asp.net/err404.htm?aspxerrorpath=/rosherove/Rss.aspx
Feed Description: Roy Osherove's persistent thoughts
you really really want to override the OnValidate() event of CollectionBase so that you can validate objects before being added to the collection. This is crucial when someone casts your collection to an IList interface and then can have their way with your collection without your approval, unless you override this important method.