Click here to Skip to main content
15,907,906 members
Home / Discussions / C#
   

C#

 
GeneralRe: NET and DCOM Pin
vad_kr20-Feb-05 20:45
vad_kr20-Feb-05 20:45 
GeneralRe: NET and DCOM Pin
sokettepower20-Feb-05 23:40
sokettepower20-Feb-05 23:40 
GeneralBitWise operation Problem Pin
memoboy20-Feb-05 1:13
memoboy20-Feb-05 1:13 
GeneralRe: BitWise operation Problem Pin
leppie20-Feb-05 2:43
leppie20-Feb-05 2:43 
GeneralRe: BitWise operation Problem Pin
memoboy20-Feb-05 6:35
memoboy20-Feb-05 6:35 
GeneralRe: BitWise operation Problem Pin
leppie20-Feb-05 6:46
leppie20-Feb-05 6:46 
QuestionHow To Get Form Instance of Requesting WebForm in Global.asax.cs Pin
Rajesh Thomas20-Feb-05 1:02
Rajesh Thomas20-Feb-05 1:02 
GeneralHelp with figuring out enums Pin
meepymoo20-Feb-05 0:37
meepymoo20-Feb-05 0:37 
Hello all. Big Grin | :-D
I have a little problem, rooted in the fact that I'm a newbie coder.
To get down to business, what I'm trying to do is this:

I have a list of status codes that I use, for example:
BLAH = 1
FEMALE = 2
POISONED = 4
FOO = 8
BAR = 16
etc...
HIDDEN = 128

and I then construct a status indication code from that. Say for example that I am Hidden (128) and Poisoned (4) then that would yeild 132. See where I'm going with this?

Well, the problem I have is reversing it. How do I check if I am poisoned? Some voice int he back in my head is tellingme something about XORing backand forth, but I have no clue where to start with that. I really want to avoid 300 if checks to see if the poisoned person happens to be female, or god forbids, also hidden.

What I want is that once a status is detected in the total 1-byte (0-255) code it should toggle an assigned bool accordingly, for example - status 4 should set isPoisoned = true.

Any easy way to do this?
I'd be eternally grateful. Laugh | :laugh:

GeneralRe: Help with figuring out enums Pin
mav.northwind20-Feb-05 1:16
mav.northwind20-Feb-05 1:16 
GeneralRe: Help with figuring out enums Pin
meepymoo20-Feb-05 2:01
meepymoo20-Feb-05 2:01 
GeneralRe: Help with figuring out enums Pin
leppie20-Feb-05 2:47
leppie20-Feb-05 2:47 
GeneralRe: Help with figuring out enums Pin
mav.northwind20-Feb-05 3:59
mav.northwind20-Feb-05 3:59 
Generalworking with performance counters and categories Pin
sagmam19-Feb-05 21:57
sagmam19-Feb-05 21:57 
QuestionHow can i display 16bir RAW image ? please help. Pin
So-Haeng, Lee19-Feb-05 20:28
So-Haeng, Lee19-Feb-05 20:28 
Questionhow to use regex to match this string? Pin
sssa200019-Feb-05 20:10
sssa200019-Feb-05 20:10 
AnswerRe: how to use regex to match this string? Pin
Kevin McFarlane20-Feb-05 0:11
Kevin McFarlane20-Feb-05 0:11 
AnswerRe: how to use regex to match this string? Pin
Christian Graus20-Feb-05 10:18
protectorChristian Graus20-Feb-05 10:18 
GeneralToggle Languages in MDI Form Pin
ye win zaw19-Feb-05 19:16
ye win zaw19-Feb-05 19:16 
QuestionHow do i listen to the desktops windows messages? Pin
FocusedWolf19-Feb-05 16:10
FocusedWolf19-Feb-05 16:10 
AnswerRe: How do i listen to the desktops windows messages? Pin
FocusedWolf19-Feb-05 16:12
FocusedWolf19-Feb-05 16:12 
QuestionApplication start at boot time? Pin
bmk_shepherd19-Feb-05 14:44
bmk_shepherd19-Feb-05 14:44 
AnswerRe: Application start at boot time? Pin
Luis Alonso Ramos19-Feb-05 18:41
Luis Alonso Ramos19-Feb-05 18:41 
GeneralKey intercepts Pin
Esmo200019-Feb-05 13:24
Esmo200019-Feb-05 13:24 
GeneralRe: Key intercepts Pin
Luis Alonso Ramos19-Feb-05 18:45
Luis Alonso Ramos19-Feb-05 18:45 
GeneralRe: Key intercepts Pin
Esmo200021-Feb-05 13:22
Esmo200021-Feb-05 13:22 

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.