by pietman
27. June 2011 11:26
I get an error as follows:
Collection was modified; enumeration operation may not execute
for the following code:
foreach (Comment comment in comments)
{
if (comment.IP == IPtoBan)
{
p.RemoveComment(comment);
}
}
you can fix this by replacing the first line with this:
foreach (Comment comment in new System.Collections.Generic.List<Comment>(comments))
121b7616-9cb1-475a-8913-c9c838f1a4ac|0|.0
Tags:
c# | Errors