Skip to content

Catch Multiple Exceptions in C#: update to .NET 10 - #2321

Merged
vladimir-pecanac-main merged 2 commits into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/63330-csharp-catch-multiple-exceptions
Oct 27, 2026
Merged

vladimir-pecanac-main merged 2 commits into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/63330-csharp-catch-multiple-exceptions

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Moves both projects in exception-handling/CatchMultipleExceptions to net10.0 and the test packages to MSTest 4.5.1, Microsoft.NET.Test.Sdk 18.11.0 and coverlet.collector 10.1.0, and fixes the test project's ProjectReference, which pointed at a CatchMultipleExceptionsAtOnes folder that does not exist, so the tests build again. The when filter now uses the or pattern, SingleCatchSwitchCase rethrows unlisted exceptions with default: throw;, unused usings are dropped, and a new FilterRunsBeforeUnwinding example with its test shows that an exception filter runs before the inner finally block and the catch body.

@vladimir-pecanac-main
vladimir-pecanac-main merged commit 496a608 into CodeMazeBlog:main Oct 27, 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