- Notifications
You must be signed in to change notification settings - Fork1.1k
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
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…int index) copies Entry object, not inner item
There was a problem hiding this 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 explicit
ICollection.CopyToimplementation to unwrapEntryobjects by accessing.Itemproperty - Ensures consistency between the typed
CopyTo(object[], int)and explicitICollection.CopyTo(Array, int)implementations
Codecov Report❌ Patch coverage is 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
Flags with carried forward coverage won't be shown.Click here to find out more. 🚀 New features to boost your workflow:
|
ricardobossan left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
All LGTM!
Uh oh!
There was an error while loading.Please reload this page.
Fixes#14071
Proposed changes
Customer Impact
Regression?
Risk
Screenshots
Before
Before.mp4
After
After.mp4
Test methodology
Test environment(s)
Microsoft Reviewers:Open in CodeFlow