The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Implementing CollectionBase the right way

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Roy Osherove

Posts: 1807
Nickname: royo
Registered: Sep, 2003

Roy Osherove is a .Net consultant based in Israel
Implementing CollectionBase the right way Posted: Sep 7, 2004 2:38 PM
Reply to this message Reply

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
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Roy Osherove
Latest Posts From ISerializable

Advertisement
Matt Berther (The "other" ISerializable...) writes a nice little tidbit about correctly deriving from CollectionBase and adds something I was not aware of:
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.
Thanks Matt.

Read: Implementing CollectionBase the right way

Topic: Change of Address Previous Topic   Next Topic Topic: Does XmlDataSource.XPath accept namespace qualifications?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use