C# - Collection Classes Question and Answer
C# - Collection Classes Question and Answer
11. Which of the following is an ordered collection class?
Map
Stack
Queue
BitArray
HashTable
Map
Stack
Queue
BitArray
HashTable
- 1 only
- 2 and 3 only
- 4 and 5 only
- All of the above
12. Which of the following is the correct way to find out the number of elements currently present in an ArrayList Collection called arr?
- arr.Count
- arr.GrowSize
- arr.MaxIndex
- arr.Capacity
13. Which of the following statements are correct about a HashTable collection?
It is a keyed collection.
It is a ordered collection.
It is an indexed collection.
It implements a IDictionaryEnumerator interface in its inner class.
The key - value pairs present in a HashTable can be accessed using the Keys and Values properties of the inner class that implements the IDictionaryEnumerator interface.
It is a keyed collection.
It is a ordered collection.
It is an indexed collection.
It implements a IDictionaryEnumerator interface in its inner class.
The key - value pairs present in a HashTable can be accessed using the Keys and Values properties of the inner class that implements the IDictionaryEnumerator interface.
- 1 and 2 only
- 1, 2 and 3 only
- 4 and 5 only
- 1, 4 and 5 only
14. Which of the following statements are correct about the Collection Classes available in Framework Class Library?
- Elements of a collection cannot be transmitted over a network.
- Elements stored in a collection can be retrieved but cannot be modified.
- It is not easy to adopt the existing Collection classes for newtype of objects.
- Elements stored in a collection can be modified only if allelements are of similar types.