winforms icon indicating copy to clipboard operation
winforms copied to clipboard

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

Open SimonZhao888 opened this issue 1 month ago • 1 comments

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

https://github.com/user-attachments/assets/c03043ca-133c-49a3-90f9-11a0cd5ba1e1

After

https://github.com/user-attachments/assets/b0c911d7-eecc-4838-a54b-9a9959efff25

Test methodology

  • Manually

Test environment(s)

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

SimonZhao888 avatar Nov 24 '25 08:11 SimonZhao888

Codecov Report

:x: Patch coverage is 0% with 1 line in your changes missing coverage. Please review. :white_check_mark: 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     
Flag Coverage Δ
Debug 77.15185% <0.00000%> (-0.01535%) :arrow_down:
integration 18.98337% <0.00000%> (-0.03587%) :arrow_down:
production 52.01170% <0.00000%> (-0.03439%) :arrow_down:
test 97.40749% <ø> (ø)
unit 49.44068% <0.00000%> (-0.03196%) :arrow_down:

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

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

codecov[bot] avatar Nov 24 '25 09:11 codecov[bot]