Skip to content

Update IEnumerable vs ICollection vs IList vs List sample to .NET 10 - #2116

Open
vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/83197-csharp-ienumerable-icollection-ilist-list
Open

Update IEnumerable vs ICollection vs IList vs List sample to .NET 10#2116
vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/83197-csharp-ienumerable-icollection-ilist-list

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Retargets both projects in collections-csharp/IEnumerableVsICollectionVsIListVsList from net7.0 to net10.0 and adds a deferred-execution demonstration to the sample.

  • DeferredExecutionDemo.ShowDeferredVsMaterialised() shows that a LINQ query re-runs the filter on every enumeration, while a materialised ICollection<T> reads a stored Count.
  • Wired into Program.Main() alongside the existing interface demos.

Verified locally on .NET 10.0.10: build clean, 7/7 NUnit tests passing.

Retarget both projects from net7.0 to net10.0 and add a deferred-execution
demonstration showing that a LINQ query re-runs on every enumeration while a
materialised ICollection<T> just reads a stored count.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant