Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit 0651649

Browse files
committed
for to foreach in ConfigListBox
1 parent 19a2114 commit 0651649

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

UI/Windows/ConfigWindow.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,9 @@ private void MetroWindow_Closing(object sender, System.ComponentModel.CancelEven
477477

478478
var configsList = new List<string>();
479479

480-
for (int i = 0; i < ConfigListBox.Items.Count; i++)
480+
foreach (ListBoxItem item in ConfigListBox.Items)
481481
{
482-
configsList.Add(((ListBoxItem)ConfigListBox.Items[i]).Content.ToString());
482+
configsList.Add(item.Content.ToString());
483483
}
484484

485485
// Check for empty named configs and disallow saving configs

0 commit comments

Comments
 (0)