We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34c8a1f commit 62e1d8dCopy full SHA for 62e1d8d
1 file changed
class/HtmlData.cs
@@ -144,15 +144,9 @@ public void Set(string Name, string Value)
144
145
public void Delete(string Name)
146
{
147
- List<NameValue> TmpNameValueList = new List<NameValue>();
148
-
149
- foreach (NameValue nv in NameValueList)
150
- {
151
- if (nv.Name != Name)
152
- TmpNameValueList.Add(nv);
153
- }
154
155
- NameValueList = TmpNameValueList;
+ for (int i = NameValueList.Count - 1; i >= 0; i--)
+ if (NameValueList[i].Name == Name)
+ NameValueList.RemoveAt(i);
156
}
157
158
public void DeleteByIndex(int Index)
0 commit comments