iGET

C# Programming - MCQ Practice Questions

C# (.NET) MCQs — OOP, collections, LINQ & exception handling.

290 questions | 100% Free

Q.281Medium

Which LINQ method is used to convert a Dictionary<K,V> to a List<T> of key-value pairs?

Q.282Easy

What is the space complexity of a HashSet<T> with n elements?

Q.283Medium

In a data processing pipeline, if you need FIFO (First-In-First-Out) semantics with O(1) enqueue/dequeue, which collection is best?

Q.284Medium

Which collection maintains elements in sorted order and is backed by a binary search tree?

Q.285Easy

What does the Peek() method do in a Stack<T>?

Q.286Hard

In a real-time cache system with limited memory, which collection supports automatic eviction of least recently used items?

Q.287Medium

What is the time complexity of Contains() method in a HashSet<T>?

Q.288Hard

Which collection should be used when you need both indexed access and automatic sorting?

Q.289Medium

In a scenario with frequent additions and removals at both ends, which collection is most efficient?

Q.290Hard

In a high-concurrency distributed system, which collection from System.Collections.Concurrent is best for one-to-many relationships?

C# Programming MCQs – Free Practice Tests | iGET | iGET