C# - Collection Classes Questions and Answers

Take Exam

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

Showing 10 of 39 questions

21. Which collection does not allow duplicate keys

  • List
  • ArrayList
  • Explanation: Dictionary requires unique keys.
  • Queue
Show Answer Report

22. Which collection is non-generic and stores data as object

  • List<T>
  • Dictionary<T,K>
  • Explanation: ArrayList stores all elements as object type.
  • LinkedList<T>
Show Answer Report

23. Which collection provides fast lookup using keys

  • Stack
  • Queue
  • Explanation: Dictionary provides fast key-based access.
  • List
Show Answer Report

24. Which class represents a collection of objects sorted by key

  • Hashtable
  • Explanation: SortedList stores key-value pairs in sorted order.
  • Stack
  • Queue
Show Answer Report

25. Which collection allows duplicate values but unique keys

  • List
  • Explanation: Dictionary allows duplicate values but keys must be unique.
  • Queue
  • Stack
Show Answer Report

26. Which method is used to add an element to List<T>

  • Insert()
  • Explanation: Add() is used to insert elements into List<T>.
  • Push()
  • Enqueue()
Show Answer Report

27. Which method removes the top element of a Stack

  • Remove()
  • Delete()
  • Explanation: Pop() removes and returns the top element.
  • Clear()
Show Answer Report

28. Which method adds an element to a Queue

  • Push()
  • Add()
  • Explanation: Enqueue() adds an element to a Queue.
  • Insert()
Show Answer Report

29. Which collection allows indexed access

  • Queue
  • Stack
  • Explanation: List allows access using index positions.
  • Dictionary
Show Answer Report

30. Which collection stores elements as nodes with links

  • ArrayList
  • List
  • Explanation: LinkedList stores elements as linked nodes.
  • Dictionary
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test