diff --git a/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml b/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml index fbadc95b..bb09c9d6 100644 --- a/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml +++ b/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml @@ -84,6 +84,7 @@ lvColumnItem = new(); - for (int k = 0; k < lstProfiles.Columns.Count; k++) + foreach (var item2 in lstProfiles.Columns) { - var item2 = lstProfiles.Columns[k]; if (item2.Tag == null) { continue; diff --git a/v2rayN/v2rayN/Views/ProfilesView.xaml.cs b/v2rayN/v2rayN/Views/ProfilesView.xaml.cs index 749a31e9..d3a6c112 100644 --- a/v2rayN/v2rayN/Views/ProfilesView.xaml.cs +++ b/v2rayN/v2rayN/Views/ProfilesView.xaml.cs @@ -353,9 +353,9 @@ namespace v2rayN.Views private void StorageUI(string? n = null) { List lvColumnItem = new(); - for (int k = 0; k < lstProfiles.Columns.Count; k++) + foreach (var t in lstProfiles.Columns) { - var item2 = (MyDGTextColumn)lstProfiles.Columns[k]; + var item2 = (MyDGTextColumn)t; lvColumnItem.Add(new() { Name = item2.ExName,