Skip to content

HowToCompareTwoListsThroughOneProperty: retarget net10.0, add ExceptByMethod - #2132

Open
vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/104029-csharp-compare-two-lists-through-one-property
Open

HowToCompareTwoListsThroughOneProperty: retarget net10.0, add ExceptByMethod#2132
vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/104029-csharp-compare-two-lists-through-one-property

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Retargets the collections-lists/HowToCompareTwoListsThroughOneProperty sample from net8.0 to net10.0 and adds an ExceptByMethod next to the five existing comparison methods, so the article can also show how to find the difference between two lists rather than only the overlap.

  • all three csproj files: net8.0 -> net10.0
  • ListCompareMethods.ExceptByMethod — projects the order keys, then ExceptBy on the customer key
  • Program.cs prints the new result alongside the other five
  • three new NUnit tests for ExceptByMethod

Build clean (pre-existing nullable warnings only), 23/23 tests pass on net10.0.

…yMethod

Retarget all three projects in the sample from net8.0 to net10.0 and add an
ExceptByMethod alongside the five existing comparison methods, so the article
can show how to find the difference between two lists and not only the overlap.

- Benchmark, tests and app csproj: net8.0 -> net10.0
- ListCompareMethods.ExceptByMethod: projects the order keys and excludes by
  them with ExceptBy, returning the customers with no orders
- Program.cs: prints the new method's result alongside the other five
- UnitTests: three tests for ExceptByMethod (partial overlap, full overlap,
  empty order list)

Build clean, 23/23 tests pass on net10.0.
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