dotnet / dotnet/winforms

Refactor classes with multiple private boolean fields to use flags enum

Open
#10,827 8 comments 0 reactions 0 assignees View on GitHub
tenet-performance
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
1d 13m
Merged PRs (30d)
85

Description

I performed a search for "private bool _" and filtered out classes with 4 or less fields, the collated and ordered results are in the table below.

I believe we can convert these to use `BitVector32` to save runtime memory usage.

- [ ] System\Windows\Forms\Controls\ComboBox\ComboBox.cs - 16
- [ ] System\Windows\Forms\Layout\Containers\SplitContainer.cs - 13
- [ ] System\Windows\Forms\Controls\ListBoxes\ListBox.cs - 12
- [x] System\Windows\Forms\DataBinding\BindingSource.cs - 12
- [ ] System\Windows\Forms\ToolTip\ToolTip.cs - 9
- [ ] System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs - 6
- [ ] System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs - 6
- [x] System\Windows\Forms\DataBinding\Binding.cs - 6
- [ ] System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs - 6
- [ ] System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs - 5
- [x] System\Windows\Forms\DataBinding\CurrencyManager.cs - 5
- [x] System\Windows\Forms\ErrorProvider\ErrorProvider.cs - 5
- [ ] System\Windows\Forms\Printing\PrintPreviewControl.cs - 5

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.