Ordered collection classes — which choices represent ordered collections in .NET?

C# Programming Collection Classes Difficulty: Easy
Choose an option
  • A
    Map only
  • B
    Stack and Queue
  • C
    BitArray and HashTable
  • D
    All of the listed collections
  • E
    None of the listed collections

Answer

Correct Answer: Stack and Queue

Explanation

Introduction / Context:“Ordered” refers to a deterministic iteration order defined by the data structure. Stack and Queue impose specific orders (LIFO and FIFO respectively).

Concept / Approach:Stack yields elements in reverse insertion order (LIFO). Queue yields elements in insertion order (FIFO). HashTable has no guaranteed order. BitArray is index-addressable but represents bits rather than general objects; the question context typically treats Stack and Queue as the canonical ordered structures among those listed.

Why Other Options Are Wrong:Map is not a standard .NET type name; HashTable has no guaranteed iteration order; “All”/“None” do not fit the behavior of Stack and Queue.

Final Answer:Stack and Queue

Discussion & Comments
No comments yet. Be the first to comment!
Join Discussion