Govt. Exams
Entrance Exams
For one-to-many relationships with concurrent access, combining ConcurrentDictionary with ConcurrentBag (or List) provides thread-safe multi-value storage per key.
LinkedList<T> provides O(1) AddFirst(), AddLast(), RemoveFirst(), and RemoveLast() operations. List<T> requires O(n) for head removals due to reindexing.
SortedList<K,V> maintains sorted order by keys and allows O(1) index-based access. SortedSet<T> doesn't support indexing.
HashSet<T> uses hash-based lookup for Contains(), achieving O(1) average-case time complexity, with O(n) worst-case in case of hash collisions.
MemoryCache provides LRU-style eviction and memory management policies. Basic collections don't have built-in LRU functionality.
Peek() returns the top element without modifying the stack. Pop() removes and returns it. Peek() throws InvalidOperationException if the stack is empty.
SortedDictionary<K,V> uses a red-black tree (binary search tree) for O(log n) operations. SortedSet<T> also uses BST but for single values.
Queue<T> provides FIFO semantics with O(1) Enqueue() and Dequeue() operations. Stack<T> is LIFO, and LinkedList operations vary.
HashSet<T> requires O(n) space to store n unique elements in the underlying hash table structure.
ToList() converts the Dictionary's KeyValuePair<K,V> enumeration into a List<KeyValuePair<K,V>>. ToArray() would create an array instead.
About C# Programming Practice on iGET
iGET offers 290+ free C# Programming MCQ questions covering all important topics. Each question is prepared by subject experts and comes with detailed explanations to help you understand concepts deeply, not just memorize answers.
Why prepare with iGET?
100% free access, timed mock tests, instant results with detailed analysis, topic-wise progress tracking, and bookmark feature for revision. Trusted by thousands of aspirants preparing for UPSC, SSC, Bank, Railway, NEET, JEE and other competitive exams across India.
How to use this page effectively
Start by selecting a difficulty level (Easy / Medium / Hard) or pick a specific topic from the topics strip. Attempt questions, check your answer instantly, read the explanation carefully, and bookmark tricky ones for later revision. For full exam-style practice, take a Mock Test from the right sidebar.