Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Fix issue 14071: ComboBox.ObjectCollection.CopyTo(Array destination, int index) copies Entry object, not inner item#14075

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
SimonZhao888 wants to merge1 commit intodotnet:main
base:main
Choose a base branch
Loading
fromSimonZhao888:Fix_issue_14071

Conversation

@SimonZhao888
Copy link
Member

@SimonZhao888SimonZhao888 commentedNov 24, 2025
edited by dotnet-policy-servicebot
Loading

Fixes#14071

Proposed changes

  • Refactored the CopyTo methods to ensure correct item copying and type safety.

Customer Impact

  • Copying ComboBox items to an array or using a collection wrapper will not throw an InvalidCastException exception.

Regression?

  • Yes

Risk

  • Minimal

Screenshots

Before

Before.mp4

After

After.mp4

Test methodology

  • Manually

Test environment(s)

  • 10.0.100-rc.2.25502.107
Microsoft Reviewers:Open in CodeFlow

…int index) copies Entry object, not inner item
Copy link
Contributor

CopilotAI left a comment

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 fixes issue#14071 whereComboBox.ObjectCollection.CopyTo(Array destination, int index) was incorrectly copying internalEntry wrapper objects instead of the actual items contained within them. This causedInvalidCastException when using collection wrappers or explicitICollection interface calls.

Key changes:

  • Modified the explicitICollection.CopyTo implementation to unwrapEntry objects by accessing.Item property
  • Ensures consistency between the typedCopyTo(object[], int) and explicitICollection.CopyTo(Array, int) implementations

@codecov
Copy link

codecovbot commentedNov 24, 2025

Codecov Report

❌ Patch coverage is0% with1 line in your changes missing coverage. Please review.
✅ Project coverage is 77.15185%. Comparing base (09c759b) to head (80df32d).

Additional details and impacted files
@@                 Coverage Diff                 @@##                main      #14075         +/-   ##===================================================- Coverage   77.16719%   77.15185%   -0.01535%===================================================  Files           3279        3279                   Lines         645317      645317                   Branches       47718       47718                 ===================================================- Hits          497973      497874         -99- Misses        143657      143757        +100+ Partials        3687        3686          -1
FlagCoverage Δ
Debug77.15185% <0.00000%> (-0.01535%)⬇️
integration18.98337% <0.00000%> (-0.03587%)⬇️
production52.01170% <0.00000%> (-0.03439%)⬇️
test97.40749% <ø> (ø)
unit49.44068% <0.00000%> (-0.03196%)⬇️

Flags with carried forward coverage won't be shown.Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@ricardobossanricardobossan left a comment

Choose a reason for hiding this comment

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

All LGTM!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ricardobossanricardobossanricardobossan left review comments

Copilot code reviewCopilotCopilot left review comments

@LeafShi1LeafShi1LeafShi1 approved these changes

@KlausLoeffelmannKlausLoeffelmannAwaiting requested review from KlausLoeffelmann

@merriemcgawmerriemcgawAwaiting requested review from merriemcgaw

Assignees

@SimonZhao888SimonZhao888

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

ComboBox.ObjectCollection.CopyTo(Array destination, int index) copies Entry object, not inner item

3 participants

@SimonZhao888@ricardobossan@LeafShi1

[8]ページ先頭

©2009-2025 Movatter.jp