Click here to Skip to main content
15,912,897 members
Home / Discussions / C#
   

C#

 
AnswerRe: which website??? pliz help me Pin
Bert delaVega25-May-08 9:00
Bert delaVega25-May-08 9:00 
Questionlock needed in this scenario? Pin
George_George25-May-08 2:24
George_George25-May-08 2:24 
AnswerRe: lock needed in this scenario? Pin
Anthony Mushrow25-May-08 3:11
professionalAnthony Mushrow25-May-08 3:11 
GeneralRe: lock needed in this scenario? Pin
George_George25-May-08 17:31
George_George25-May-08 17:31 
GeneralRe: lock needed in this scenario? Pin
Anthony Mushrow25-May-08 21:07
professionalAnthony Mushrow25-May-08 21:07 
GeneralRe: lock needed in this scenario? Pin
George_George25-May-08 21:28
George_George25-May-08 21:28 
AnswerRe: lock needed in this scenario? Pin
Luc Pattyn25-May-08 4:19
sitebuilderLuc Pattyn25-May-08 4:19 
GeneralRe: lock needed in this scenario? Pin
George_George25-May-08 18:53
George_George25-May-08 18:53 
So great, Luc!


1.

I have re-written the code as you suggested, here is my code, could you help to review whether it is your idea please? Smile | :)

// Thread 1
{
    Dictionary localDic=Dic1;
    localDic.op1();
    localDic.op2();
    localDic.op3();
}


// Thread 2
{
    Dictionary Dic2 = new Dictionary();
    Dic2.insert();
    Dic2.insert();
    Dic2.insert();
    Dic1 = Dic2;
}


2.

Luc Pattyn wrote:
Dic1=Dic2; is an
atomic operation.


Do you mean all reference assignment operation is atomic in C#? Any support documents?


regards,
George
GeneralRe: lock needed in this scenario? Pin
Luc Pattyn25-May-08 21:06
sitebuilderLuc Pattyn25-May-08 21:06 
GeneralRe: lock needed in this scenario? Pin
George_George25-May-08 21:27
George_George25-May-08 21:27 
GeneralRe: lock needed in this scenario? Pin
Luc Pattyn26-May-08 2:52
sitebuilderLuc Pattyn26-May-08 2:52 
GeneralRe: lock needed in this scenario? Pin
George_George26-May-08 15:39
George_George26-May-08 15:39 
Questiondoing validation in other file.cs Pin
angels77725-May-08 1:58
angels77725-May-08 1:58 
AnswerRe: doing validation in other file.cs Pin
Christian Graus25-May-08 2:03
protectorChristian Graus25-May-08 2:03 
GeneralRe: doing validation in other file.cs Pin
angels77725-May-08 2:10
angels77725-May-08 2:10 
GeneralRe: doing validation in other file.cs Pin
#realJSOP25-May-08 2:14
professional#realJSOP25-May-08 2:14 
Questionwhich website define proje from beginer to advance?, pliz help me Pin
mbaz25-May-08 1:56
mbaz25-May-08 1:56 
AnswerRe: which website define proje from beginer to advance?, pliz help me Pin
Christian Graus25-May-08 2:06
protectorChristian Graus25-May-08 2:06 
QuestionLine changment in streamWriter and sensitive replace method Pin
Casper Hansen25-May-08 1:53
Casper Hansen25-May-08 1:53 
AnswerRe: Line changment in streamWriter and sensitive replace method Pin
Casper Hansen25-May-08 2:33
Casper Hansen25-May-08 2:33 
QuestionIFIlter: how can I read name of value-type property? Pin
Prazwol24-May-08 22:55
Prazwol24-May-08 22:55 
QuestionVisual Studio Setup and Deployment projects Pin
danielk_24-May-08 19:22
danielk_24-May-08 19:22 
AnswerRe: Visual Studio Setup and Deployment projects Pin
Dario Solera25-May-08 0:36
Dario Solera25-May-08 0:36 
QuestionActive Directory and C# Pin
Imtiaz Murtaza24-May-08 12:59
Imtiaz Murtaza24-May-08 12:59 
AnswerRe: Active Directory and C# Pin
teejayem24-May-08 13:39
teejayem24-May-08 13:39 

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.