Wrox Programmer Forums
|
BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6
This is the forum to discuss the Wrox book Beginning Visual Basic 2005 by Thearon Willis, Bryan Newsome; ISBN: 9780764574016
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 8th, 2008, 06:11 PM
Registered User
 
Join Date: Jan 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ch.5, Hashtable code mystery

I can't find any reason why on page 162 the EmailHashtable() property is added. What is the purpose of it? Why is it Public?

I removed this entire property code and replaced all instances of "EmailHashtable" in the code with "objEmailHashtable". The code works perfectly fine, the same as with this property. So the question again - why add this property and not use the object directly?...

Another question: on page 166 we add new definition of RemoveAt method. What for?... We don't use RemoveAt in the code anywhere in this Chapter. Is it done "just in case", to make the code more flexible? Deleting the RemoveAt definition didn't change anything in the way the sample code worked - it was still working fine.
In "How it works" there is a text: "You’ll also find that when you delete items from the collection by using Remove, the corresponding entry is also removed from the Hashtable, because of this method that you added:". It doesn't make sense to me as the method shown below is the one for RemoveAt. So maybe it is an error and the text should be "also find that when you delete items from the collection by using RemoveAt, the corresponding entry is also removed from the Hashtable, because of this method that you added:" - that would confirm that the new RemoveAt method is added just to make the code more universal, not specifically for the code written in this chapter as it doesn't use it.





Similar Threads
Thread Thread Starter Forum Replies Last Post
String Mystery binishkhan87 C# 3 October 6th, 2007 04:19 PM
error mystery htummala Oracle 2 February 28th, 2005 02:28 AM
MM:DataSet mystery bridon123 Dreamweaver (all versions) 2 January 12th, 2004 10:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.