Skip to content

ListExistsInAnotherCSharp: .NET 11 port and corrected Except, tuple and Where examples - #2432

Open
vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/104070-csharp-check-if-items-of-a-list-exist-in-another-list
Open

vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/104070-csharp-check-if-items-of-a-list-exist-in-another-list

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Moves both projects to net11.0 with BenchmarkDotNet 0.15.8, MSTest 4.5.3, Microsoft.NET.Test.Sdk 18.12.0 and coverlet.collector 10.1.1. The int-list techniques now live in a static CompareListsExamples class that the benchmark calls, the Except checks compare against the distinct count so duplicates no longer give a false match, the student Intersect and Except examples compare (FirstName, LastName) tuples instead of joined strings, the Where example finally calls Where(), and three all-items checks are added. The benchmark runs InProcess on two 10,000-item lists built in a GlobalSetup per scenario, and three new tests cover the duplicate, joined-name and all-items cases.

…nd Where examples

Move the int-list techniques into a static CompareListsExamples class that the
benchmark calls, compare Except results against the distinct count, project
students to (FirstName, LastName) tuples, add the missing Where() call, add the
all-items checks, and run the benchmark InProcess at 10,000 items with Params and
GlobalSetup. Three new tests cover the duplicate, joined-name and all-items cases.
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