Skip to content
AtomicReps

Navigation

09/30Computer Science

C# Collections & LINQ.

The containers a C# program uses and the query operators that read them.

  • C# Collections & LINQ · 1 of 3

    Dictionaries & sets

    In C#, what does HashSet<T> store?

  • C# Collections & LINQ · 2 of 3

    LINQ performance

    In C#, what does a deferred LINQ query repeat each time it is enumerated?

  • C# Collections & LINQ · 3 of 3

    Deferred execution

    In C#, the same Where query's Count() gives two different numbers within one request. Based on this program, what explains it?

    typescript
    using System.Linq;var nums = new List<int> { 1, 2 };var q = nums.Where(n => n > 0);Console.WriteLine(q.Count());nums.Add(3);Console.WriteLine(q.Count());

Three of the 1,204 C# Collections & LINQ questions.

Keep going with C# Collections & LINQ, free
Next topic · 10/30C# Memory & Types.