Click here to Skip to main content
15,902,299 members
Home / Discussions / C#
   

C#

 
Generalinternet explorer automation with msi Pin
Asad Hussain25-Apr-05 12:32
Asad Hussain25-Apr-05 12:32 
GeneralRe: internet explorer automation with msi Pin
Heath Stewart25-Apr-05 13:33
protectorHeath Stewart25-Apr-05 13:33 
GeneralRe: internet explorer automation with msi Pin
Alex Korchemniy25-Apr-05 14:20
Alex Korchemniy25-Apr-05 14:20 
GeneralRe: internet explorer automation with msi Pin
Asad Hussain26-Apr-05 5:23
Asad Hussain26-Apr-05 5:23 
GeneralWindow's state Pin
Anonymous25-Apr-05 11:25
Anonymous25-Apr-05 11:25 
GeneralRe: Window's state Pin
Anonymous25-Apr-05 11:32
Anonymous25-Apr-05 11:32 
GeneralRegular expression help Pin
Judah Gabriel Himango25-Apr-05 11:22
sponsorJudah Gabriel Himango25-Apr-05 11:22 
GeneralLock a ArrayList Pin
Snowjim25-Apr-05 11:21
Snowjim25-Apr-05 11:21 
Hey!

I got a ArrayList that is readed and modified from diffrent methods in a class. Its inportant that there is not more thw one thread working against this arraylist at a time.

I have tryed

<br />
Method1()<br />
{<br />
  lock(myArrayList)<br />
  {<br />
      //do the oporation<br />
  }<br />
}<br />
Method2()<br />
{<br />
  lock(myArrayList)<br />
  {<br />
      //do the oporation<br />
  } <br />
}<br />
Method3()<br />
{<br />
  lock(myArrayList)<br />
  {<br />
      //do the oporation<br />
  } <br />
}<br />


this lock(myArrayList is used in all the methods that are working against the arraylist.

The strange thing is that the program freezes on the lock and cant get past it?

Maby i shold use ArrayList.SyncRoot or ArrayList.Synchronized ???

a exemple would be good

Best Regards
SnowJim
GeneralRe: Lock a ArrayList Pin
Dave Kreskowiak25-Apr-05 14:01
mveDave Kreskowiak25-Apr-05 14:01 
GeneralRe: Lock a ArrayList Pin
S. Senthil Kumar25-Apr-05 18:14
S. Senthil Kumar25-Apr-05 18:14 
GeneralRe: Lock a ArrayList Pin
Dave Kreskowiak26-Apr-05 2:26
mveDave Kreskowiak26-Apr-05 2:26 
GeneralRe: Lock a ArrayList Pin
S. Senthil Kumar26-Apr-05 2:28
S. Senthil Kumar26-Apr-05 2:28 
QuestionHow to list all disks Pin
Anonymous25-Apr-05 10:59
Anonymous25-Apr-05 10:59 
AnswerRe: How to list all disks Pin
CiNN25-Apr-05 11:11
CiNN25-Apr-05 11:11 
QuestionHow to get ConfigurationSettings for multiple users Pin
Asad Hussain25-Apr-05 10:18
Asad Hussain25-Apr-05 10:18 
AnswerRe: How to get ConfigurationSettings for multiple users Pin
tdciDoug25-Apr-05 10:31
tdciDoug25-Apr-05 10:31 
GeneralRe: How to get ConfigurationSettings for multiple users Pin
Asad Hussain25-Apr-05 10:59
Asad Hussain25-Apr-05 10:59 
Generalprevious article on copying windows explorer functionality Pin
Anonymous25-Apr-05 9:08
Anonymous25-Apr-05 9:08 
GeneralRe: previous article on copying windows explorer functionality Pin
Polis Pilavas26-Apr-05 1:55
Polis Pilavas26-Apr-05 1:55 
QuestionSerialPort(framwork2) is freezing when closing? Pin
Snowjim25-Apr-05 8:10
Snowjim25-Apr-05 8:10 
AnswerRe: SerialPort(framwork2) is freezing when closing? Pin
Snowjim25-Apr-05 8:14
Snowjim25-Apr-05 8:14 
GeneralRe: SerialPort(framwork2) is freezing when closing? Pin
Snowjim25-Apr-05 8:36
Snowjim25-Apr-05 8:36 
GeneralSecondary message loop Pin
Luis Alonso Ramos25-Apr-05 7:48
Luis Alonso Ramos25-Apr-05 7:48 
GeneralRe: Secondary message loop Pin
S. Senthil Kumar25-Apr-05 19:06
S. Senthil Kumar25-Apr-05 19:06 
GeneralCompile differences in file and memory Pin
machocr25-Apr-05 7:15
machocr25-Apr-05 7:15 

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.