![]() |
|
#1
|
|||
|
|||
Using lock() with ArrayListHello experts. I am trying to lock a portion of my code where I have 2 ArrayList objects and need to transfer elements from one to the other. I am having a problem in that after I leave the lock() block, the elements in one of my arrays have vanished. Like so:
C-SHARP / C# Code:
|
|||
|
#2
|
|||
|
|||
Re: Using lock() with ArrayListMy apologies. There was not a problem. It just appeared as though there was.
|
|
#3
|
|||
|
|||
Re: Using lock() with ArrayListOne point to note, you should really have your object as a readonly object, so that it cannot be changed whilst in the lock()
readonly Object mylock = new Object(); |
Recent GIDBlog
Install Adobe Flash - Without Administrator Rights by LocalTech
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Opperations on objects in ArrayList | 05131013 | Java Forum | 1 | 25-Apr-2008 13:14 |
| How do I lock the hardware buttons of Pocket PC in Dot net compact framework 2.0 | Anil Darandale | .NET Forum | 0 | 14-Feb-2008 00:21 |
| Lock Folder Without Any Software | nsnraju | Computer Software Forum - Windows | 0 | 28-Sep-2007 01:18 |
| Permission denied: ap_proxy: couldn't release the lock | com2com | Apache Web Server Forum | 0 | 25-Mar-2006 10:23 |
| Simple file lock works on unices, not on Windows | QED | C++ Forum | 1 | 03-Feb-2005 07:25 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The