Skip to content

Update ArraySegment sample to .NET 11 - #2418

Merged
vladimir-pecanac-main merged 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/104141-csharp-arraysegment
Nov 29, 2026
Merged

vladimir-pecanac-main merged 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/104141-csharp-arraysegment

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Moves both projects in collections-arrays/HowToUseTheArraySegmentStructInCSharp to net11.0 and updates the test packages (xunit 2.9.3, xunit.runner.visualstudio 4.0.1, Microsoft.NET.Test.Sdk 18.12.0, coverlet.collector 10.1.0). Program.cs gains a short example that converts the segment to a ReadOnlySpan and keeps it in a record across an await. Two new tests cover equality of segments over different arrays with the same values and the implicit conversion to Span, and the empty segment test now checks Count instead of Assert.Empty, which xUnit 2.9.3 flags with xUnit2028.

@vladimir-pecanac-main
vladimir-pecanac-main merged commit 0875a59 into CodeMazeBlog:main Nov 29, 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