Click here to Skip to main content
16,005,181 members
Home / Discussions / C#
   

C#

 
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 
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 
In which way are you going to "process" the status? It's a list of values that can be OR'ed to form an integer, nothing more, nothing less.
In the example, if you want to set several status bits in one go, you can write
characterStatus = Status.Poisoned | Status.Sleeping;
which is equivalent to writing
characterStatus = 6; // 6 == (2 | 4)
In order to colorize a box you'd write something like
Color boxColor = IsPoisoned ? Color.Green : Color.Red;
with the IsPoisoned property implemented similar to IsHidden in my previous posting.

The reason you're getting integer values when you query the characterStatus is that Enums are based on integers (Int32 IIRC) by default. You can use different data types (for example Int16 or byte) if you write
public enum Status : byte
Regards,
mav
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 
GeneralRe: Key intercepts Pin
Luis Alonso Ramos21-Feb-05 14:16
Luis Alonso Ramos21-Feb-05 14:16 
GeneralRe: Key intercepts Pin
S. Senthil Kumar20-Feb-05 8:41
S. Senthil Kumar20-Feb-05 8:41 
GeneralCreate Registry Key during theInstallation Pin
Sasuko19-Feb-05 11:27
Sasuko19-Feb-05 11:27 
GeneralRe: Create Registry Key during theInstallation Pin
xpmule20-Feb-05 17:01
xpmule20-Feb-05 17:01 

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.