L. P. with Microsoft C# - Level 3-Quiz-5

  1. the following are the concrete collections into which .NET has implemented collection interfaces.
    1. Array Lists
    2. Queues
    3. Stack
    4. Hashtables
  2. An enumerator gives you the ability to scroll through a collection to access all the individual elements of the collection using some sort of pre-defined techniques.
  3. IDictionary interface represents a set of keys and corresponding values.
  4. IList interface represents a set of objects that are accessed using an indexer, rather than a key/value.
  5. You want a collection that will store any type of object, allow dynamic, resizable arrays of those objects, and give you full random access to those elements. You should  use An ArrayList.
  6. You have an ArrayList that you want to allow multiple threads to access simultaneously. Synchronize method is supported by the ArrayList to make the ArrayList thread-safe.
  7. If you create an ArrayList without specifying how many elements it is to hold, the capacity of the ArrayList will be 16 by default .
  8. Queue class works on a first in, first out basis.
  9. When you have a Queue full of elements, how do you look at the head element without removing it from the Queue?
    Peek
  10. When you have a Queue full of elements, how do you return the first element in the Queue and remove it from the Queue at the same time?
    Dequeue
  11. you would use A stack if you wanted to keep a trail of where you have been and keep track of a convenient way to get back.
  12. You have a Stack, and want to add an item to it. What member of the Stack class do you use to add the item?
    Push
  13. You have a Hashtable, and you want to put additional elements into it.  you use Add method to do this.
Permalink | Comments (0) | Hits: 1056 | Time: 23:51:46
Learning Programming with Microsoft C# - Level 3-5.6
Learning Programming with Microsoft C# - Level 3-6.1
All Comments

 No Data Now...

Post Your Comment
^ ^

Top