C# - Collection Classes Questions and Answers
C# Collection Classes questions with answers are highly useful for mastering data storage and manipulation techniques in programming. Topics like Lists, Dictionaries, Queues, and HashSets are frequently tested in programming interviews and coding assessments. Practicing programming questions and answers with explanations helps students improve their understanding of C# data structures and performance optimization. Such programming MCQs and problem-based aptitude questions are commonly asked in technical interviews and placement tests conducted by companies like Microsoft, TCS, and Infosys. Strengthen your skills through C# programming test practice and learn to use collections efficiently.
Questions on data collections in C language. Broaden skills with arrays and pointers
C# - Collection Classes
11. Which of the following is an ordered collection class? 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.
- 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.