Click here to Skip to main content
16,006,440 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Export a Dataset to a csv file. Pin
chrismerrill22-Apr-05 5:52
chrismerrill22-Apr-05 5:52 
GeneralRe: Export a Dataset to a csv file. Pin
UniBond23-Apr-05 7:51
UniBond23-Apr-05 7:51 
GeneralHowTo Bind An ImageButton to a DataSource.Help!!! Pin
22-Apr-05 4:20
suss22-Apr-05 4:20 
GeneralRe: HowTo Bind An ImageButton to a DataSource.Help!!! Pin
Dave Kreskowiak22-Apr-05 5:14
mveDave Kreskowiak22-Apr-05 5:14 
Generali Pin
Anonymous22-Apr-05 4:09
Anonymous22-Apr-05 4:09 
GeneralRe: i Pin
toxcct22-Apr-05 4:32
toxcct22-Apr-05 4:32 
Generalcollections doubt Pin
carlos_rocha22-Apr-05 3:56
carlos_rocha22-Apr-05 3:56 
GeneralRe: collections doubt Pin
Dave Kreskowiak22-Apr-05 5:12
mveDave Kreskowiak22-Apr-05 5:12 
If you synchronize access to the collection, the thread that gets to the collection second will block until the first thread releases its lock.

As is plastered all over the .NET Framework documentation, enumerating a collection is not a thread-safe operation. From the Array class documentation:
Thread Safety
Public static (Shared in Visual Basic) members of this type are safe for multithreaded
operations. Instance members are not guaranteed to be thread-safe.
 
This implementation does not provide a synchronized (thread-safe) wrapper for an Array;
however, .NET Framework classes based on Array provide their own synchronized version of the
collection using the SyncRoot property.
 
Enumerating through a collection is intrinsically not a thread-safe procedure. Even when a
collection is synchronized, other threads could still modify the collection, which causes the
enumerator to throw an exception. To guarantee thread safety during enumeration, you can either
lock the collection during the entire enumeration or catch the exceptions resulting from changes
made by other threads.




RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralRe: collections doubt Pin
carlos_rocha22-Apr-05 7:42
carlos_rocha22-Apr-05 7:42 
GeneralRe: collections doubt Pin
Dave Kreskowiak22-Apr-05 13:17
mveDave Kreskowiak22-Apr-05 13:17 
GeneralRe: collections doubt Pin
rwestgraham22-Apr-05 14:11
rwestgraham22-Apr-05 14:11 
GeneralRe: collections doubt Pin
carlos_rocha25-Apr-05 22:31
carlos_rocha25-Apr-05 22:31 
GeneralRe: collections doubt Pin
rwestgraham26-Apr-05 13:09
rwestgraham26-Apr-05 13:09 
GeneralRe: collections doubt Pin
carlos_rocha26-Apr-05 22:19
carlos_rocha26-Apr-05 22:19 
GeneralRe: collections doubt Pin
rwestgraham1-May-05 10:19
rwestgraham1-May-05 10:19 
GeneralCannot copy… It is being used by another person Pin
KreativeKai22-Apr-05 3:50
professionalKreativeKai22-Apr-05 3:50 
GeneralRe: Cannot copy… It is being used by another person Pin
Dave Kreskowiak22-Apr-05 5:02
mveDave Kreskowiak22-Apr-05 5:02 
GeneralRe: Cannot copy… It is being used by another person Pin
KreativeKai22-Apr-05 6:22
professionalKreativeKai22-Apr-05 6:22 
GeneralRe: Cannot copy… It is being used by another person Pin
Dave Kreskowiak22-Apr-05 7:05
mveDave Kreskowiak22-Apr-05 7:05 
GeneralRe: Cannot copy… It is being used by another person Pin
Dave Kreskowiak22-Apr-05 7:14
mveDave Kreskowiak22-Apr-05 7:14 
GeneralRe: Cannot copy… It is being used by another person Pin
rwestgraham25-Apr-05 9:01
rwestgraham25-Apr-05 9:01 
Generalweb services Pin
muktajoshi_1022-Apr-05 1:40
muktajoshi_1022-Apr-05 1:40 
GeneralRe: web services Pin
Dave Kreskowiak22-Apr-05 4:55
mveDave Kreskowiak22-Apr-05 4:55 
GeneralError Handling Pin
dpagka21-Apr-05 23:38
dpagka21-Apr-05 23:38 
GeneralRe: Error Handling Pin
Colin Angus Mackay22-Apr-05 0:01
Colin Angus Mackay22-Apr-05 0:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.