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
Bill
NA
3
0
IndexOutOfRange Exception on foreach loop
Jun 25 2008 10:51 AM
I am getting a wierd result in my code sporadically. First of all, I am using an old VB .NET client dll which uses a Microsoft.VisualBasic.Collection, ugh! When I loop through the collection in my C# code, I occasionally get an exception.
the code ..
foreach (Tag tag in object.Tags)
{
...
}
sometimes I get an IndexOutOfRange, sometimes a NullReference, the code is invoked by a thread timer. Is it that the Collection isn't thread safe? It runs fine on my XP development machine, but not on the Windows Server 2003R2 server. I dont get it.
Any ideas?
Reply
Answers (
2
)
How to move checkeditems file in listbox to a folder?
NP103 Why is rule not followed ?