Skip to content

Filter a list based on another list: .NET 10 and new filtering demos - #2342

Merged
vladimir-pecanac-main merged 3 commits into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/116839-csharp-filter-a-list-based-on-another-list
Nov 4, 2026
Merged

vladimir-pecanac-main merged 3 commits into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/116839-csharp-filter-a-list-based-on-another-list

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Moves the HowToFilterAListBasedOnAnotherListInCSharp sample from .NET 8 to .NET 10 and updates the test packages (Microsoft.NET.Test.Sdk 18.11.0, xunit 2.9.3, xunit.runner.visualstudio 4.0.1, coverlet.collector 10.1.0). Fixes the three nullable warnings on Student and School with string.Empty initializers, and adds four methods with their tests and Program.cs demos: RemoveNotContained (in-place filtering with RemoveAll), FilterContainedUsingHashSetLookup (Where with a HashSet lookup, keeping order and duplicates), and FilterStudentsBySchoolCityUsingJoin and FilterStudentsBySchoolCityUsingIntersectBy (matching students to schools on the city key).

@vladimir-pecanac-main
vladimir-pecanac-main merged commit fe20899 into CodeMazeBlog:main Nov 4, 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