Skip to content

Lookup in C#: port to .NET 10 and add a ToLookup vs GroupBy example - #2310

Merged
vladimir-pecanac-main merged 2 commits into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/116921-csharp-lookup
Oct 20, 2026
Merged

vladimir-pecanac-main merged 2 commits into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/116921-csharp-lookup

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Moves the LookupInCSharp sample from net8.0 to net10.0 and updates the test packages (xunit 2.9.3, xunit.runner.visualstudio 4.0.1, Microsoft.NET.Test.Sdk 18.11.0, coverlet.collector 10.1.0). Adds CountValuesAfterSourceChanges, which groups the same list with GroupBy and ToLookup and then changes the list, plus two tests: one for a key that is not in the lookup and one showing that only GroupBy sees the change. The five existing methods are unchanged.

Move both projects to net10.0, update the test packages (xunit 2.9.3, xunit.runner.visualstudio 4.0.1, Microsoft.NET.Test.Sdk 18.11.0, coverlet.collector 10.1.0), add CountValuesAfterSourceChanges to compare ToLookup with GroupBy, and add tests for a missing key and for a source that changes after the call.
@vladimir-pecanac-main
vladimir-pecanac-main merged commit 34f9093 into CodeMazeBlog:main Oct 20, 2026
4 checks passed
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