O'Reilly logo

Visual C#® 2012: How to Program, Fifth Edition by Harvey Deitel, Paul Deitel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Answers to Self-Review Exercises

21.1 a) enumerator (or foreach statement). b) ArrayList. c) indexer. d) MoveNext. e) InvalidOperationException.

21.2 a) True. b) True. c) False. The class must also implement property Current. d) False. An ArrayList stores only objects. Autoboxing occurs when adding a value type to the ArrayList. You can prevent boxing by instead using generic class List with a value type. e) True. f) False. A Hashtable cannot contain duplicate keys. g) True. h) False. Dictionary is a class; IDictionary is an interface. i) False. An enumerator cannot be used to change the values of elements. j) False. With hashing, as the load factor increases, there are fewer available slots relative to the total number of slots, so the chance ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required