Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Use Array.Copy in Match.AddMatch - #122894

#122894
Merged
stephentoub merged 1 commit into
dotnet:maindotnet/runtime:mainfrom
stephentoub:addmatchstephentoub/runtime:addmatchCopy head branch name to clipboard
Jan 5, 2026
Merged

Use Array.Copy in Match.AddMatch#122894
stephentoub merged 1 commit into
dotnet:maindotnet/runtime:mainfrom
stephentoub:addmatchstephentoub/runtime:addmatchCopy head branch name to clipboard

Conversation

@stephentoub

Copy link
Copy Markdown
Member

No description provided.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions
See info in area-owners.md if you want to be subscribed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves code quality by replacing a manual for-loop with the built-in Array.Copy method in the Match.AddMatch method. The change enhances both readability and performance by using a well-optimized framework method for copying array elements.

Key Changes:

  • Replaced manual element-by-element array copy loop with Array.Copy call in Match.AddMatch

@stephentoub
stephentoub enabled auto-merge (squash) January 5, 2026 21:09
@stephentoub
stephentoub merged commit ee72dc8 into dotnet:main Jan 5, 2026
89 of 94 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.