W3Teacher
  • Explore
    Browse by field
    Artificial Intelligence Accounting & Finance Information Technology
    Show all fields
  • Interview Q&A
    • All Interview Questions
    • Beginner
    • Intermediate
    • Advanced
  • Practice
    • MCQs
    • Quizzes
    • Mock Interviews
  • About
  • Sign in
  • Get Started
  1. Home
  2. C#
  3. Collections
  4. Question
All 16 Collections questions
More in Collections
When should you use a Dictionary<TKey,TValue>? What is the difference between List<T> and an array (T[]) in terms of resizing? What is the difference between Dictionary<TKey, TValue> and List<T> in terms of lookup performance? What is the difference between IEnumerable, ICollection and IList? What does HashSet<T> provide and when do you use it? When would you choose a HashSet<T> over a List<T>, and what guarantee does it provide? How does Queue<T> differ from Stack<T> in terms of the order items are removed? What is the difference between IEnumerable<T>, ICollection<T>, and IList<T> in the collection interface hierarchy? When would you reach for a ConcurrentDictionary or an immutable collection? How do you avoid multiple enumeration of an IEnumerable?
Advertisement
C# › Collections

When would you use a List<T> vs an array?

Beginner

Answer

Use an array for a fixed-size, performance-critical buffer; use List<T> when the count changes, since it grows and offers Add/Remove/Insert.
int[] fixedGrid = new int[9];
var items = new List<string>(); items.Add("a");
Real-world example A game board is an array; a shopping cart is a List<T>.
Next question When should you use a Dictionary<TKey,TValue>?
All 16 Collections questions
W3Teacher

Learn technologies. Ace technical interviews.


    Learn
    • Technologies
    • Tutorials
    • Interview Questions
    • MCQs
    Practice
    • Quizzes
    • Mock Interviews
    • Bookmarks
    • Dashboard
    Get the latest questions & tips

    Fresh interview questions and practice tips, straight to your inbox.

    Company
    • About
    • Contact us
    • Privacy Policy
    • Terms & Conditions

    © 2026 W3Teacher. All rights reserved.