Click here to Skip to main content
15,905,073 members
Home / Discussions / C#
   

C#

 
AnswerRe: hi friends I need help Pin
Christian Graus20-Aug-08 21:18
protectorChristian Graus20-Aug-08 21:18 
GeneralRe: hi friends I need help Pin
Denver Thomas20-Aug-08 21:52
Denver Thomas20-Aug-08 21:52 
GeneralRe: hi friends I need help Pin
Christian Graus20-Aug-08 22:29
protectorChristian Graus20-Aug-08 22:29 
GeneralRe: hi friends I need help Pin
Denver Thomas21-Aug-08 0:18
Denver Thomas21-Aug-08 0:18 
QuestionSQL srver 2000 and C# Connection error Pin
Gulfaraz20-Aug-08 20:52
Gulfaraz20-Aug-08 20:52 
AnswerRe: SQL srver 2000 and C# Connection error Pin
Blue_Boy20-Aug-08 21:12
Blue_Boy20-Aug-08 21:12 
QuestionHow do i? Pin
Silvyster20-Aug-08 16:05
Silvyster20-Aug-08 16:05 
AnswerRe: How do i? Pin
PIEBALDconsult20-Aug-08 16:40
mvePIEBALDconsult20-Aug-08 16:40 
GeneralRe: How do i? Pin
Silvyster20-Aug-08 16:44
Silvyster20-Aug-08 16:44 
GeneralRe: How do i? Pin
PIEBALDconsult20-Aug-08 17:17
mvePIEBALDconsult20-Aug-08 17:17 
GeneralRe: How do i? Pin
JoeRip20-Aug-08 18:09
JoeRip20-Aug-08 18:09 
GeneralRe: How do i? Pin
TheFM23420-Aug-08 18:52
TheFM23420-Aug-08 18:52 
QuestionDoes Boolean not need an Interlocked.Exchange method? Pin
JoeRip20-Aug-08 15:31
JoeRip20-Aug-08 15:31 
AnswerRe: Does Boolean not need an Interlocked.Exchange method? Pin
Christian Graus20-Aug-08 15:47
protectorChristian Graus20-Aug-08 15:47 
GeneralRe: Does Boolean not need an Interlocked.Exchange method? Pin
JoeRip20-Aug-08 15:52
JoeRip20-Aug-08 15:52 
GeneralRe: Does Boolean not need an Interlocked.Exchange method? Pin
Mark Churchill20-Aug-08 17:53
Mark Churchill20-Aug-08 17:53 
GeneralRe: Does Boolean not need an Interlocked.Exchange method? Pin
JoeRip20-Aug-08 18:08
JoeRip20-Aug-08 18:08 
GeneralRe: Does Boolean not need an Interlocked.Exchange method? Pin
Christian Graus20-Aug-08 19:36
protectorChristian Graus20-Aug-08 19:36 
GeneralRe: Does Boolean not need an Interlocked.Exchange method? Pin
N a v a n e e t h20-Aug-08 20:28
N a v a n e e t h20-Aug-08 20:28 
GeneralRe: Does Boolean not need an Interlocked.Exchange method? Pin
Mark Churchill21-Aug-08 5:31
Mark Churchill21-Aug-08 5:31 
AnswerRe: Does Boolean not need an Interlocked.Exchange method? Pin
Daniel Grunwald21-Aug-08 0:45
Daniel Grunwald21-Aug-08 0:45 
GeneralRe: Does Boolean not need an Interlocked.Exchange method? Pin
JoeRip21-Aug-08 2:31
JoeRip21-Aug-08 2:31 
Daniel Grunwald wrote:
However, if you use the boolean for things like "run this code only once", then you have to lock/use Interlocked.CompareExchange to ensure that only the first thread to set the boolean to true runs the "run only once" code.


Remember that there is no Interlocked.CompareExchange for boolean types. You can use an INT and treat it like a boolean, but that's pretty inelegant.

Oddly enough, Microsoft has repeatedly chosen not to support booleans in the Interlocked methods, despite the many requests I found in their forums/Connection Feedbacks.
GeneralRe: Does Boolean not need an Interlocked.Exchange method? Pin
Daniel Grunwald21-Aug-08 2:39
Daniel Grunwald21-Aug-08 2:39 
Questionftp server - client question here Pin
AndreasAlex20-Aug-08 14:56
AndreasAlex20-Aug-08 14:56 
AnswerRe: ftp server - client question here Pin
AndreasAlex20-Aug-08 14:59
AndreasAlex20-Aug-08 14:59 

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.