-
Notifications
You must be signed in to change notification settings - Fork 982
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert ArrayList
usage to List<T>
where possible
#8140
Comments
Arraylist
usage to List<T>
where possibleArrayList
usage to List<T>
where possible
This issue is now marked as "help wanted", and we’re looking for a community volunteer to work on this issue. If we receive no interest in 180 days, we will close the issue. To learn more about how we handle feature requests, please see our documentation. Happy Coding! |
This is a great idea, and a wonderful place for the community to engage and find the right areas to make changes like this. Of course, we'd need to avoid making this happen on the public surface area 😄 |
One issue I have run into is that there are a few collections which expose |
I would be happy to contribute. I will start with combing through the code base to identify the various classes that would be affected. |
@Jericho awesome! Just respond here and I will add it to the issue description. I think the easiest way to get this done is to fix them one by one instead of batches. I suspect it will be nicer for reviewers and isolates any regressions. It also speeds up the time is takes to merge. |
Yes, that's the best way. The smaller and the more targeted a PR - the easier it is to review and faster to merge. That said, it's easier to look at a PR that makes the same changes in 50 files than to look at 50 PRs making the same change in one file. So it's a matter of balance and good judgement. |
Here's the list of classes that will benefit from replacing
Here are classes that use an
|
@dreddy-work I think this can be refactored to remove the usage or ArrayList. But I don't understand the adding of the null value to the list. Can you make sense of it at all? winforms/src/System.Windows.Forms/src/System/Windows/Forms/ListViewGroupConverter.cs Lines 113 to 133 in 5aca3ed
|
@dreddy-work when an |
Can you elaborate on this? I didn't get it fully. |
What i see is, some typeconverters include |
I also see a few examples of |
If the API surface isn't public and then yes. Maybe create a separate issue for it and add a link back here. |
Agree with @elachlan. Just need to be cautious on public APIs and indirect public surface area. |
okay, done: #8728 |
Same question with the internal uses of |
Are there still areas I can fix for this issue? |
Is your feature request related to a problem? Please describe
Winforms uses
Arraylist
extensively.Describe the solution you'd like and alternatives you've considered
Convert
Arraylist
usage toList<T>
to reduce boxing and improve memory utilization.Will this feature affect UI controls?
N/A
Related: #2644
Remaining occurrences in
System.Windows.Forms.Design
The text was updated successfully, but these errors were encountered: