Skip to content

Commit ec80c83

Browse files
Fix error Collection was modified; enumeration operation may not execute (#806)
1 parent 8cd5dd4 commit ec80c83

File tree

1 file changed

+2
-5
lines changed
  • dotnet/src/dotnetframework/GxClasses/Core

1 file changed

+2
-5
lines changed

dotnet/src/dotnetframework/GxClasses/Core/GXUtils.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -986,11 +986,8 @@ private static void RestoreEndOfString(GxRegexMatch values)
986986
{
987987
if (values != null)
988988
{
989-
int idx = 0;
990-
foreach (string v in values.Groups)
991-
{
992-
values.Groups[idx] = RestoreEndOfString(v);
993-
}
989+
for (int i=0; i < values.Groups.Count; i++)
990+
values.Groups[i] = RestoreEndOfString(values.Groups[i]);
994991
}
995992
}
996993
static public GxSimpleCollection<string> Split(string txt, string rex)

0 commit comments

Comments
 (0)