Click here to Skip to main content
15,891,033 members
Home / Discussions / C#
   

C#

 
GeneralRe: Mouse not responding Pin
Richard Andrew x6424-Nov-11 10:32
professionalRichard Andrew x6424-Nov-11 10:32 
GeneralMessage Removed Pin
24-Nov-11 10:46
Joseph A Delinski Jr24-Nov-11 10:46 
GeneralRe: Mouse not responding Pin
Joseph A Delinski Jr24-Nov-11 11:20
Joseph A Delinski Jr24-Nov-11 11:20 
AnswerRe: Mouse not responding Pin
BillWoodruff24-Nov-11 18:42
professionalBillWoodruff24-Nov-11 18:42 
GeneralRe: Mouse not responding Pin
Joseph A Delinski Jr24-Nov-11 20:38
Joseph A Delinski Jr24-Nov-11 20:38 
QuestionUse single bool and bit flags for other bools. Pin
V K 224-Nov-11 1:39
V K 224-Nov-11 1:39 
AnswerRe: Use single bool and bit flags for other bools. PinPopular
Pete O'Hanlon24-Nov-11 2:27
mvePete O'Hanlon24-Nov-11 2:27 
GeneralRe: Use single bool and bit flags for other bools. Pin
harold aptroot24-Nov-11 3:07
harold aptroot24-Nov-11 3:07 
I can think of plenty of reasons for this - none of which have directly to do with optimization (not for speed anyway).
For example,
- the flags are a field in a structure used in interop. (happens all the time)
- the flags are delivered as packed flags and later have to be passed on as flags. Saves a lot of setting up and tearing down to just leave them packed.
- when a switch over the packed flags (or a subset of them) is shorter and clearer than a massive tree of if's. (uncommon)
- when operations done on the flags can be done by short expressions of arithmetic and bitwise operations, and doing it manually with bools would create a huge mess. (ok this one is pretty rare, unless you write emulators)
GeneralRe: Use single bool and bit flags for other bools. Pin
Pete O'Hanlon24-Nov-11 3:26
mvePete O'Hanlon24-Nov-11 3:26 
GeneralRe: Use single bool and bit flags for other bools. Pin
harold aptroot24-Nov-11 3:34
harold aptroot24-Nov-11 3:34 
GeneralRe: Use single bool and bit flags for other bools. Pin
PIEBALDconsult24-Nov-11 4:28
mvePIEBALDconsult24-Nov-11 4:28 
GeneralRe: Use single bool and bit flags for other bools. Pin
Pete O'Hanlon24-Nov-11 4:57
mvePete O'Hanlon24-Nov-11 4:57 
GeneralRe: Use single bool and bit flags for other bools. Pin
Not Active24-Nov-11 13:51
mentorNot Active24-Nov-11 13:51 
GeneralRe: Use single bool and bit flags for other bools. Pin
Eddy Vluggen24-Nov-11 8:51
professionalEddy Vluggen24-Nov-11 8:51 
GeneralRe: Use single bool and bit flags for other bools. Pin
PIEBALDconsult25-Nov-11 3:07
mvePIEBALDconsult25-Nov-11 3:07 
AnswerRe: Use single bool and bit flags for other bools. Pin
Eddy Vluggen25-Nov-11 7:26
professionalEddy Vluggen25-Nov-11 7:26 
GeneralRe: Use single bool and bit flags for other bools. Pin
PIEBALDconsult26-Nov-11 7:32
mvePIEBALDconsult26-Nov-11 7:32 
AnswerRe: Use single bool and bit flags for other bools. Pin
Eddy Vluggen26-Nov-11 7:53
professionalEddy Vluggen26-Nov-11 7:53 
GeneralRe: Use single bool and bit flags for other bools. Pin
harold aptroot25-Nov-11 3:45
harold aptroot25-Nov-11 3:45 
AnswerRe: Use single bool and bit flags for other bools. Pin
PIEBALDconsult24-Nov-11 3:53
mvePIEBALDconsult24-Nov-11 3:53 
GeneralRe: Use single bool and bit flags for other bools. Pin
Rob Philpott24-Nov-11 5:10
Rob Philpott24-Nov-11 5:10 
AnswerRe: Use single bool and bit flags for other bools. Pin
SilimSayo24-Nov-11 6:20
SilimSayo24-Nov-11 6:20 
AnswerRe: Use single bool and bit flags for other bools. Pin
jtstanish24-Nov-11 12:36
jtstanish24-Nov-11 12:36 
GeneralRe: Use single bool and bit flags for other bools. Pin
BillWoodruff24-Nov-11 18:44
professionalBillWoodruff24-Nov-11 18:44 
AnswerRe: Use single bool and bit flags for other bools. Pin
SledgeHammer0124-Nov-11 19:12
SledgeHammer0124-Nov-11 19:12 

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.