24 Generics & Collections questions from the C# bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.
Free to start: the 2-minute IT readiness check — six questions and a result.
A.the minimal sequence contract that exposes only forward iteration via an enumerator, with no Count, indexer, or mutation members
B.a sequence contract extending iteration with a Count property and add/remove/contains mutation operations
C.a type or method parameterized over one or more type arguments supplied at use, giving compile-time type safety without boxing or casts
D.a variance relationship, marked with the out modifier on a type parameter, that lets a sequence of a derived type be used where a sequence of its base type is expected
Answer + AI explanation with Pro
2. Which term means: "a type or method parameterized over one or more type arguments supplied at use, giving compile-time type safety without boxing or casts"?
Junior
A.IEnumerable interface
B.Generic type
C.Dictionary collection
D.Covariance
Answer + AI explanation with Pro
3. Which statement is correct?
Junior
A.Generic type — a variance relationship, marked with the in modifier on a type parameter, that lets a consumer of a base type be used where a consumer of a derived type is expected
B.Generic type — a type or method parameterized over one or more type arguments supplied at use, giving compile-time type safety without boxing or casts
C.Generic type — a where-clause restriction on a type parameter, such as requiring a base class, an interface, a parameterless constructor, or a reference or value kind
D.Generic type — a sequence contract extending iteration with a Count property and add/remove/contains mutation operations
Answer + AI explanation with Pro
4. What is List collection?
Junior
A.a generic associative container mapping unique keys to values with average constant-time lookup via hashing
B.a generic, resizable, index-addressable sequence backed by an internal array that grows automatically as elements are added
C.a sequence contract extending iteration with a Count property and add/remove/contains mutation operations
D.the minimal sequence contract that exposes only forward iteration via an enumerator, with no Count, indexer, or mutation members
Answer + AI explanation with Pro
5. Which term means: "a generic, resizable, index-addressable sequence backed by an internal array that grows automatically as elements are added"?
Junior
A.Covariance
B.IEnumerable interface
C.List collection
D.Dictionary collection
Answer + AI explanation with Pro
6. Which statement is correct?
Junior
A.List collection — a type or method parameterized over one or more type arguments supplied at use, giving compile-time type safety without boxing or casts
B.List collection — a variance relationship, marked with the in modifier on a type parameter, that lets a consumer of a base type be used where a consumer of a derived type is expected
C.List collection — a generic associative container mapping unique keys to values with average constant-time lookup via hashing
D.List collection — a generic, resizable, index-addressable sequence backed by an internal array that grows automatically as elements are added
Answer + AI explanation with Pro
7. What is Dictionary collection?
Junior
A.a sequence contract extending iteration with a Count property and add/remove/contains mutation operations
B.a generic associative container mapping unique keys to values with average constant-time lookup via hashing
C.a variance relationship, marked with the in modifier on a type parameter, that lets a consumer of a base type be used where a consumer of a derived type is expected
D.a variance relationship, marked with the out modifier on a type parameter, that lets a sequence of a derived type be used where a sequence of its base type is expected
Answer + AI explanation with Pro
8. Which term means: "a generic associative container mapping unique keys to values with average constant-time lookup via hashing"?
Junior
A.List collection
B.Dictionary collection
C.Covariance
D.Generic constraint
Answer + AI explanation with Pro
9. Which statement is correct?
Junior
A.Dictionary collection — a type or method parameterized over one or more type arguments supplied at use, giving compile-time type safety without boxing or casts
B.Dictionary collection — a where-clause restriction on a type parameter, such as requiring a base class, an interface, a parameterless constructor, or a reference or value kind
C.Dictionary collection — a variance relationship, marked with the in modifier on a type parameter, that lets a consumer of a base type be used where a consumer of a derived type is expected
D.Dictionary collection — a generic associative container mapping unique keys to values with average constant-time lookup via hashing
Answer + AI explanation with Pro
10. What is Generic constraint?
Mid
A.a sequence contract extending iteration with a Count property and add/remove/contains mutation operations
B.a where-clause restriction on a type parameter, such as requiring a base class, an interface, a parameterless constructor, or a reference or value kind
C.a type or method parameterized over one or more type arguments supplied at use, giving compile-time type safety without boxing or casts
D.the minimal sequence contract that exposes only forward iteration via an enumerator, with no Count, indexer, or mutation members
Answer + AI explanation with Pro
11. Which term means: "a where-clause restriction on a type parameter, such as requiring a base class, an interface, a parameterless constructor, or a reference or value kind"?
Mid
A.Generic constraint
B.Covariance
C.IEnumerable interface
D.Generic type
Answer + AI explanation with Pro
12. Which statement is correct?
Mid
A.Generic constraint — the minimal sequence contract that exposes only forward iteration via an enumerator, with no Count, indexer, or mutation members
B.Generic constraint — a sequence contract extending iteration with a Count property and add/remove/contains mutation operations
C.Generic constraint — a generic associative container mapping unique keys to values with average constant-time lookup via hashing
D.Generic constraint — a where-clause restriction on a type parameter, such as requiring a base class, an interface, a parameterless constructor, or a reference or value kind
Answer + AI explanation with Pro
13. What is IEnumerable interface?
Mid
A.the minimal sequence contract that exposes only forward iteration via an enumerator, with no Count, indexer, or mutation members
B.a where-clause restriction on a type parameter, such as requiring a base class, an interface, a parameterless constructor, or a reference or value kind
C.a generic associative container mapping unique keys to values with average constant-time lookup via hashing
D.a generic, resizable, index-addressable sequence backed by an internal array that grows automatically as elements are added
Answer + AI explanation with Pro
14. Which term means: "the minimal sequence contract that exposes only forward iteration via an enumerator, with no Count, indexer, or mutation members"?
Mid
A.IEnumerable interface
B.Covariance
C.Generic constraint
D.Dictionary collection
Answer + AI explanation with Pro
15. Which statement is correct?
Mid
A.IEnumerable interface — a where-clause restriction on a type parameter, such as requiring a base class, an interface, a parameterless constructor, or a reference or value kind
B.IEnumerable interface — a generic associative container mapping unique keys to values with average constant-time lookup via hashing
C.IEnumerable interface — the minimal sequence contract that exposes only forward iteration via an enumerator, with no Count, indexer, or mutation members
D.IEnumerable interface — a sequence contract extending iteration with a Count property and add/remove/contains mutation operations
Answer + AI explanation with Pro
16. What is ICollection interface?
Mid
A.a variance relationship, marked with the in modifier on a type parameter, that lets a consumer of a base type be used where a consumer of a derived type is expected
B.a type or method parameterized over one or more type arguments supplied at use, giving compile-time type safety without boxing or casts
C.a sequence contract extending iteration with a Count property and add/remove/contains mutation operations
D.a generic associative container mapping unique keys to values with average constant-time lookup via hashing
Answer + AI explanation with Pro
17. Which term means: "a sequence contract extending iteration with a Count property and add/remove/contains mutation operations"?
Mid
A.Dictionary collection
B.Contravariance
C.ICollection interface
D.Covariance
Answer + AI explanation with Pro
18. Which statement is correct?
Mid
A.ICollection interface — a sequence contract extending iteration with a Count property and add/remove/contains mutation operations
B.ICollection interface — a generic, resizable, index-addressable sequence backed by an internal array that grows automatically as elements are added
C.ICollection interface — a variance relationship, marked with the in modifier on a type parameter, that lets a consumer of a base type be used where a consumer of a derived type is expected
D.ICollection interface — the minimal sequence contract that exposes only forward iteration via an enumerator, with no Count, indexer, or mutation members
Answer + AI explanation with Pro
19. What is Covariance?
Senior
A.the minimal sequence contract that exposes only forward iteration via an enumerator, with no Count, indexer, or mutation members
B.a variance relationship, marked with the out modifier on a type parameter, that lets a sequence of a derived type be used where a sequence of its base type is expected
C.a generic associative container mapping unique keys to values with average constant-time lookup via hashing
D.a where-clause restriction on a type parameter, such as requiring a base class, an interface, a parameterless constructor, or a reference or value kind
Answer + AI explanation with Pro
20. Which term means: "a variance relationship, marked with the out modifier on a type parameter, that lets a sequence of a derived type be used where a sequence of its base type is expected"?
Senior
A.Covariance
B.Dictionary collection
C.ICollection interface
D.List collection
Answer + AI explanation with Pro
21. Which statement is correct?
Senior
A.Covariance — a generic, resizable, index-addressable sequence backed by an internal array that grows automatically as elements are added
B.Covariance — a generic associative container mapping unique keys to values with average constant-time lookup via hashing
C.Covariance — a variance relationship, marked with the in modifier on a type parameter, that lets a consumer of a base type be used where a consumer of a derived type is expected
D.Covariance — a variance relationship, marked with the out modifier on a type parameter, that lets a sequence of a derived type be used where a sequence of its base type is expected
Answer + AI explanation with Pro
22. What is Contravariance?
Senior
A.a sequence contract extending iteration with a Count property and add/remove/contains mutation operations
B.a variance relationship, marked with the in modifier on a type parameter, that lets a consumer of a base type be used where a consumer of a derived type is expected
C.the minimal sequence contract that exposes only forward iteration via an enumerator, with no Count, indexer, or mutation members
D.a generic, resizable, index-addressable sequence backed by an internal array that grows automatically as elements are added
Answer + AI explanation with Pro
23. Which term means: "a variance relationship, marked with the in modifier on a type parameter, that lets a consumer of a base type be used where a consumer of a derived type is expected"?
Senior
A.ICollection interface
B.Dictionary collection
C.Generic constraint
D.Contravariance
Answer + AI explanation with Pro
24. Which statement is correct?
Senior
A.Contravariance — a where-clause restriction on a type parameter, such as requiring a base class, an interface, a parameterless constructor, or a reference or value kind
B.Contravariance — a type or method parameterized over one or more type arguments supplied at use, giving compile-time type safety without boxing or casts
C.Contravariance — a variance relationship, marked with the out modifier on a type parameter, that lets a sequence of a derived type be used where a sequence of its base type is expected
D.Contravariance — a variance relationship, marked with the in modifier on a type parameter, that lets a consumer of a base type be used where a consumer of a derived type is expected
Answer + AI explanation with Pro
Free to start
Start with a free readiness check
Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Generics & Collections question come with Pro.