Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: Showing a Form as a drop-down menu Pin
J. Dunlap16-Jun-03 7:47
J. Dunlap16-Jun-03 7:47 
GeneralArrayLists & multithreading... Pin
viperxp15-Jun-03 5:56
viperxp15-Jun-03 5:56 
GeneralRe: ArrayLists & multithreading... Pin
leppie15-Jun-03 6:44
leppie15-Jun-03 6:44 
GeneralRe: ArrayLists & multithreading... Pin
Arjan Einbu15-Jun-03 11:46
Arjan Einbu15-Jun-03 11:46 
GeneralRe: ArrayLists & multithreading... Pin
viperxp15-Jun-03 23:24
viperxp15-Jun-03 23:24 
GeneralRe: ArrayLists & multithreading... Pin
James T. Johnson16-Jun-03 0:10
James T. Johnson16-Jun-03 0:10 
GeneralRe: ArrayLists & multithreading... Pin
viperxp16-Jun-03 2:53
viperxp16-Jun-03 2:53 
GeneralRe: ArrayLists & multithreading... Pin
James T. Johnson16-Jun-03 3:13
James T. Johnson16-Jun-03 3:13 
viperxp wrote:
is syncList an identical copy of theList, or just another reference to theList?

It is wrapper around theList, which internally contains a reference to it.

viperxp wrote:
How can i apply the Sychronized(), lock(), and SyncRoot in my context?

With Synchronized() you don't have to do anything but ensure that you do all of your reading and writing with syncList.

From the documentation on the "lock statement" (since I couldn't think of the correct wording, but slightly modified):
The lock keyword marks a block [of code] as a critical section by obtaining the mutual-exclusion lock for a given object, executing [the code], and then releasing the lock.
You use it by passing in a reference to an object which will serve as the 'key' to entering into the lock.

In this case, the 'key' to the ArrayList is returned by the SyncRoot property.

HTH,

James

"I despise the city and much prefer being where a traffic jam means a line-up at McDonald's"
Me when telling a friend why I wouldn't want to live with him

GeneralRe: ArrayLists & multithreading... Pin
viperxp16-Jun-03 7:10
viperxp16-Jun-03 7:10 
QuestionSimple inheritance? Pin
mcgahanfl15-Jun-03 2:27
mcgahanfl15-Jun-03 2:27 
AnswerRe: Simple inheritance? Pin
leppie15-Jun-03 3:54
leppie15-Jun-03 3:54 
GeneralRe: Simple inheritance? Pin
mcgahanfl15-Jun-03 17:14
mcgahanfl15-Jun-03 17:14 
GeneralWeb service performance... Pin
Matt Gullett15-Jun-03 2:25
Matt Gullett15-Jun-03 2:25 
GeneralRe: Web service performance... Pin
Kannan Kalyanaraman15-Jun-03 3:41
Kannan Kalyanaraman15-Jun-03 3:41 
GeneralRe: Web service performance... Pin
Matt Gullett15-Jun-03 3:47
Matt Gullett15-Jun-03 3:47 
GeneralRe: Web service performance... Pin
Kannan Kalyanaraman15-Jun-03 17:01
Kannan Kalyanaraman15-Jun-03 17:01 
GeneralRe: Web service performance... Pin
Rocky Moore15-Jun-03 23:18
Rocky Moore15-Jun-03 23:18 
GeneralRe: Web service performance... Pin
Matt Gullett15-Jun-03 23:35
Matt Gullett15-Jun-03 23:35 
GeneralDynamic object cloneing. Pin
Peter Kiss15-Jun-03 1:07
Peter Kiss15-Jun-03 1:07 
GeneralC# Service won't start Pin
gek_at14-Jun-03 23:59
gek_at14-Jun-03 23:59 
GeneralRe: C# Service won't start Pin
mcgahanfl15-Jun-03 2:16
mcgahanfl15-Jun-03 2:16 
GeneralRe: C# Service won't start Pin
gek_at15-Jun-03 3:20
gek_at15-Jun-03 3:20 
GeneralRe: C# Service won't start Pin
mcgahanfl15-Jun-03 3:53
mcgahanfl15-Jun-03 3:53 
GeneralRe: C# Service won't start Pin
gek_at15-Jun-03 11:11
gek_at15-Jun-03 11:11 
GeneralRe: C# Service won't start Pin
gek_at16-Jun-03 7:31
gek_at16-Jun-03 7:31 

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.