TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
knights
NA
114
125.5k
Exception in Queue while removing an element ?
Dec 9 2010 10:59 AM
I have a queue carrying class objects.Each class object has 3 string properties.In a loop i am checking with an If condition, on one of the class properties and on that basis i want to remove(dequeue) an object.
Suppose in c#.net and some pseudo code following is the scenario.
Foreach Loop to iterate through queue items
if myClassObj==(int)Class.Property1.ToString()
{
queue.Dequeue(this)
}
EndLoop
I get an exception saying that "Collection was modified after the enumerator was instantiated." Any one got idea about this? and also any alternates are welcome.Cheers
Reply
Answers (
2
)
Error:Failure sending mail.
restrict values entered into a datagrid cell only for numbers