Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding and removing items in collection
Message
From
27/10/2015 12:31:46
 
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01626445
Message ID:
01626512
Views:
34
>Doesn't look like it's the most useful in this case since, AFAICS, you can only get a read only value from the collection:
>https://msdn.microsoft.com/en-us/library/h0fzzwyh(v=vs.110).aspx

When it is an object, I can update the value.

>"Whenever possible, you should use the generic collections in the System.Collections.Generic namespace or the System.Collections.Concurrent namespace instead of a Visual Basic Collection. For more information, see Collections (C# and Visual Basic)."
>
>and:
>
>"Iterating through a Visual Basic Collection is not a thread-safe procedure. Even if the collection is synchronized, other threads can still modify the collection, causing the enumerator to throw an exception. To guarantee thread safety during enumeration, either lock the collection or catch the exceptions resulting from changes made by other threads. For more information on locking a programming element, see SyncLock Statement."
>
>If your collection is accessible from other web hits that might explain the problem you are seeing ?

Thanks
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform