Click here to Skip to main content
16,008,183 members
Home / Discussions / C#
   

C#

 
GeneralModifying window without activating Pin
S O S3-Aug-03 2:26
S O S3-Aug-03 2:26 
GeneralTopmost windows Pin
S O S3-Aug-03 1:02
S O S3-Aug-03 1:02 
GeneralRe: Topmost windows Pin
LovelyXiaoXinXin3-Aug-03 3:02
LovelyXiaoXinXin3-Aug-03 3:02 
GeneralRe: Topmost windows Pin
S O S3-Aug-03 3:25
S O S3-Aug-03 3:25 
GeneralLock problem Pin
Meysam Mahfouzi2-Aug-03 23:03
Meysam Mahfouzi2-Aug-03 23:03 
GeneralRe: Lock problem Pin
Arjan Einbu3-Aug-03 4:32
Arjan Einbu3-Aug-03 4:32 
GeneralRe: Lock problem Pin
Meysam Mahfouzi3-Aug-03 16:42
Meysam Mahfouzi3-Aug-03 16:42 
GeneralRe: Lock problem Pin
James T. Johnson3-Aug-03 16:43
James T. Johnson3-Aug-03 16:43 
Meisi wrote:
When working on al_A or al_B, how can I lock all corresponding included objects?

You have to lock each object as you attempt to work on it.

You should also be using lock on the ArrayList's SyncRoot object, this ensures that if you use either the Synchronized or ReadOnly wrappers you will be locking on the same object.

lock(al_A.SyncRoot)
{
  foreach(object a in al_A)
  {
    lock(a)
    {
      // use a
    }
  }
}


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: Lock problem Pin
Meysam Mahfouzi3-Aug-03 16:54
Meysam Mahfouzi3-Aug-03 16:54 
GeneralRe: Lock problem Pin
James T. Johnson3-Aug-03 17:01
James T. Johnson3-Aug-03 17:01 
QuestionHow do I supress the Expect: 100-continue header from being sent with a HttpWebRequest Post? Pin
Furty2-Aug-03 19:43
Furty2-Aug-03 19:43 
GeneralRead and write in .INF file Pin
Hoang Dung2-Aug-03 16:59
Hoang Dung2-Aug-03 16:59 
GeneralRe: Read and write in .INF file Pin
Furty3-Aug-03 17:41
Furty3-Aug-03 17:41 
QuestionVB6/VB.NET Case Is < 0 in c# ??? Pin
Chua Wen Ching2-Aug-03 14:49
Chua Wen Ching2-Aug-03 14:49 
AnswerRe: VB6/VB.NET Case Is < 0 in c# ??? Pin
Marc Clifton2-Aug-03 15:04
mvaMarc Clifton2-Aug-03 15:04 
AnswerRe: VB6/VB.NET Case Is < 0 in c# ??? Pin
J. Dunlap2-Aug-03 15:08
J. Dunlap2-Aug-03 15:08 
GeneralRe: VB6/VB.NET Case Is &lt; 0 in c# ??? Pin
Marc Clifton2-Aug-03 15:09
mvaMarc Clifton2-Aug-03 15:09 
GeneralRe: VB6/VB.NET Case Is &lt; 0 in c# ??? Pin
J. Dunlap2-Aug-03 15:11
J. Dunlap2-Aug-03 15:11 
GeneralRe: VB6/VB.NET Case Is &lt; 0 in c# ??? Pin
Chua Wen Ching2-Aug-03 20:11
Chua Wen Ching2-Aug-03 20:11 
AnswerRe: VB6/VB.NET Case Is &lt; 0 in c# ??? Pin
Marc Clifton2-Aug-03 15:08
mvaMarc Clifton2-Aug-03 15:08 
GeneralRe: VB6/VB.NET Case Is &lt; 0 in c# ??? Pin
Csharp™3-Aug-03 4:29
Csharp™3-Aug-03 4:29 
GeneralRe: VB6/VB.NET Case Is &lt; 0 in c# ??? Pin
Marc Clifton3-Aug-03 5:22
mvaMarc Clifton3-Aug-03 5:22 
AnswerRe: VB6/VB.NET Case Is &lt; 0 in c# ??? Pin
LovelyXiaoXinXin3-Aug-03 16:49
LovelyXiaoXinXin3-Aug-03 16:49 
GeneralUnwanted XML attribute Pin
Omega5012-Aug-03 14:27
Omega5012-Aug-03 14:27 
Generaldocking a datagrid Pin
mikemilano2-Aug-03 12:23
mikemilano2-Aug-03 12:23 

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.