View Single Post
  #2 (permalink)  
Old October 30th, 2006, 03:20 PM
Karli Karli is offline
Wrox Author
 
Join Date: Dec 2003
Location: Birmingham, , United Kingdom.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi there,

Example Ch11Ex02 is a general example for defining a collection, and not just of implementing an indexed. However, the code for an indexer is included to illustrate how to add one. The code in the example does not make use of this indexer, but you can check that it's working in your code by adding the following line:

animalCollection[0].Feed();

Without the indexer this code will not compile.

I hope that helps, and perhaps you are right that the example should include code that uses the indexer.

Cheers,

Karli

----------
www.karliwatson.com
IT Specialist & Author
Technical Director, www.3form.net
Reply With Quote