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

C#

 
GeneralRe: passing arrays as arguments in C# Pin
Ravenet7-Feb-08 16:17
Ravenet7-Feb-08 16:17 
GeneralBitwise masking - What's wrong with this code? [SOLVED] Pin
#realJSOP7-Feb-08 10:01
professional#realJSOP7-Feb-08 10:01 
GeneralRe: Bitwise masking - What's wrong with this code? Pin
led mike7-Feb-08 10:07
led mike7-Feb-08 10:07 
GeneralRe: Bitwise masking - What's wrong with this code? Pin
Christian Graus7-Feb-08 10:08
protectorChristian Graus7-Feb-08 10:08 
GeneralRe: Bitwise masking - What's wrong with this code? Pin
#realJSOP7-Feb-08 10:18
professional#realJSOP7-Feb-08 10:18 
GeneralRe: Bitwise masking - What's wrong with this code? Pin
Christian Graus7-Feb-08 11:25
protectorChristian Graus7-Feb-08 11:25 
GeneralRe: Bitwise masking - What's wrong with this code? Pin
#realJSOP7-Feb-08 23:16
professional#realJSOP7-Feb-08 23:16 
GeneralRe: Bitwise masking - What's wrong with this code? Pin
Ennis Ray Lynch, Jr.7-Feb-08 15:25
Ennis Ray Lynch, Jr.7-Feb-08 15:25 
The value for System.Threading.ThreadState.Running is 0. 0 & anything is zero. Zero always causing a PITA when doing bitwise comparisons causing a special case. In fact, I do not think you can bitwise a 0. In the set of all real numbers the | on 0 will always return a result. Notice in the documentation on the MSDN, however, that running is a exclusivespecial case that is not bitwiseable with any other case.

The proper code would be

if(myThread.ThreadState == System.Threading.ThreadState.Running){

}
else if(myThread.ThreadState & System.Threading.ThreadState.AnyOtherState == AnyOtherState){

}

Need a C# Consultant? I'm available.


Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway


Generalfloating values issue Pin
Ryno Burger7-Feb-08 8:41
Ryno Burger7-Feb-08 8:41 
GeneralRe: floating values issue Pin
J$7-Feb-08 8:47
J$7-Feb-08 8:47 
GeneralRe: floating values issue Pin
led mike7-Feb-08 8:49
led mike7-Feb-08 8:49 
GeneralRe: floating values issue Pin
Ryno Burger7-Feb-08 8:51
Ryno Burger7-Feb-08 8:51 
GeneralRe: floating values issue Pin
Luc Pattyn7-Feb-08 12:21
sitebuilderLuc Pattyn7-Feb-08 12:21 
GeneralRe: floating values issue Pin
benjymous7-Feb-08 22:03
benjymous7-Feb-08 22:03 
GeneralWith apologies Pin
Ennis Ray Lynch, Jr.8-Feb-08 3:48
Ennis Ray Lynch, Jr.8-Feb-08 3:48 
GeneralProblem with Insert statement Pin
MumbleB7-Feb-08 7:54
MumbleB7-Feb-08 7:54 
GeneralRe: Problem with Insert statement Pin
led mike7-Feb-08 8:46
led mike7-Feb-08 8:46 
GeneralRe: Problem with Insert statement Pin
MumbleB7-Feb-08 9:27
MumbleB7-Feb-08 9:27 
GeneralRe: Problem with Insert statement Pin
led mike7-Feb-08 9:57
led mike7-Feb-08 9:57 
AnswerRe: Problem with Insert statement Pin
Guffa7-Feb-08 12:22
Guffa7-Feb-08 12:22 
GeneralRe: Problem with Insert statement Pin
Ravenet7-Feb-08 16:21
Ravenet7-Feb-08 16:21 
AnswerRe: Problem with Insert statement Pin
MumbleB7-Feb-08 19:44
MumbleB7-Feb-08 19:44 
GeneralStop keyboard and mouse input with a screen Pin
lifeh2o7-Feb-08 3:15
lifeh2o7-Feb-08 3:15 
GeneralRe: Stop keyboard and mouse input with a screen Pin
Justin Perez7-Feb-08 4:19
Justin Perez7-Feb-08 4:19 
GeneralRe: Stop keyboard and mouse input with a screen Pin
lifeh2o8-Feb-08 0:45
lifeh2o8-Feb-08 0:45 

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.