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. Search: LINQ
  3. C#
  4. LINQ
  5. Question
All 18 LINQ questions
More in LINQ
What is LINQ, and what are the two main syntax styles you can use to write a LINQ query? What is the difference between Where() and Select() in a LINQ query? What is the difference between IEnumerable and IQueryable in LINQ? What is the difference between First, FirstOrDefault and Single? What is the difference between Select and SelectMany? What is 'deferred execution' in LINQ, and how does it differ from calling .ToList() or .ToArray() immediately? How do GroupBy() and its resulting IGrouping<TKey, TElement> work? What is the difference between First(), FirstOrDefault(), Single(), and SingleOrDefault()? What is LINQ, and how does it simplify querying collections compared to writing manual loops? What is the difference between IEnumerable<T>, IQueryable<T>, and List<T>, and how does choosing the wrong one hurt performance against a database?
Advertisement
Back to results for “LINQ”
C# › LINQ

What is LINQ and what is deferred execution?

Beginner

Answer

LINQ queries collections and data sources uniformly. Most operators are lazy: the query executes when enumerated (foreach/ToList), so it reflects the latest data.
var q = nums.Where(n => n > 2); // not run yet
nums.Add(5);
foreach (var n in q) {}          // runs now, sees 5
Real-world example Building a filter then materialising it only after paging parameters are known.
Next question What is LINQ, and what are the two main syntax styles you can use to write a LINQ query?
All 18 LINQ 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.