Govt. Exams
Entrance Exams
ConcurrentDictionary<K,V> from System.Collections.Concurrent is thread-safe for multi-threaded applications, unlike Dictionary<K,V>.
IEnumerable<T> only provides iteration. ICollection<T> extends it with Count property and methods like Add(), Remove(), Clear() for modification.
OrderByDescending sorts by Age in descending order. ThenBy applies secondary sort by Name in ascending order. This is a multi-level LINQ sort.
HashSet<T> requires O(n) space to store n unique elements. Hash tables require linear space proportional to the number of stored elements.
Both FindAll() and Where() (LINQ) can filter collections. Where() returns IEnumerable and is more modern. FindAll() returns a List directly.