Click here to Skip to main content
15,028,681 members
Home / Discussions / C#
   

C#

 
AnswerRe: Code style Pin
Keith Barrow28-Jun-11 0:23
professionalKeith Barrow28-Jun-11 0:23 
GeneralRe: Code style Pin
Pete O'Hanlon28-Jun-11 0:34
mvePete O'Hanlon28-Jun-11 0:34 
GeneralRe: Code style Pin
Lutosław28-Jun-11 0:45
MemberLutosław28-Jun-11 0:45 
GeneralRe: Code style Pin
Keith Barrow28-Jun-11 1:22
professionalKeith Barrow28-Jun-11 1:22 
GeneralRe: Code style Pin
Lutosław28-Jun-11 1:50
MemberLutosław28-Jun-11 1:50 
GeneralRe: Code style Pin
Keith Barrow28-Jun-11 1:57
professionalKeith Barrow28-Jun-11 1:57 
GeneralRe: Code style Pin
BobJanova28-Jun-11 3:45
MemberBobJanova28-Jun-11 3:45 
GeneralRe: Code style Pin
Keith Barrow28-Jun-11 7:32
professionalKeith Barrow28-Jun-11 7:32 
BobJanova wrote:
also smells

Agreed, but where I'd disagree is here:
BobJanova wrote:
because it's harder to see that that's what you're doing.

I'd say having the condition visible at each branch is more clear, but that is a matter of opinion.

BobJanova wrote:
If he's switching on this enum in several places, perhaps the class hierarchy should be adjusted so that it is not an enum

Yes, and the article I pointed him to makes this very point. As I said, he might not have the luxury of altering that much (the graphics classes are riddled with enums, forcing attendant switches), so I gave him another option.

GeneralRe: Code style Pin
BobJanova28-Jun-11 7:42
MemberBobJanova28-Jun-11 7:42 
GeneralRe: Code style Pin
Pete O'Hanlon28-Jun-11 7:59
mvePete O'Hanlon28-Jun-11 7:59 
GeneralRe: Code style Pin
Lutosław28-Jun-11 8:08
MemberLutosław28-Jun-11 8:08 
NewsNOTE 3 ,4 Pin
Lutosław28-Jun-11 0:48
MemberLutosław28-Jun-11 0:48 
AnswerRe: Code style [modified] Pin
PIEBALDconsult28-Jun-11 3:09
professionalPIEBALDconsult28-Jun-11 3:09 
AnswerRe: Code style Pin
SledgeHammer0128-Jun-11 7:34
MemberSledgeHammer0128-Jun-11 7:34 
GeneralRe: Code style Pin
Lutosław28-Jun-11 8:04
MemberLutosław28-Jun-11 8:04 
GeneralRe: Code style Pin
SledgeHammer0128-Jun-11 8:51
MemberSledgeHammer0128-Jun-11 8:51 
GeneralRe: Code style Pin
Lutosław28-Jun-11 9:47
MemberLutosław28-Jun-11 9:47 
QuestionCreating a multidimensional array from class Pin
lada_vyvojar27-Jun-11 20:34
Memberlada_vyvojar27-Jun-11 20:34 
AnswerRe: Creating a multidimensional array from class Pin
Mario Majčica27-Jun-11 23:29
professionalMario Majčica27-Jun-11 23:29 
QuestionRead from Byte Array Pin
DJ24527-Jun-11 20:04
MemberDJ24527-Jun-11 20:04 
AnswerRe: Read from Byte Array Pin
Pete O'Hanlon27-Jun-11 21:49
mvePete O'Hanlon27-Jun-11 21:49 
AnswerRe: Read from Byte Array Pin
Mario Majčica27-Jun-11 23:31
professionalMario Majčica27-Jun-11 23:31 
AnswerRe: Read from Byte Array Pin
BobJanova27-Jun-11 23:52
MemberBobJanova27-Jun-11 23:52 
GeneralBitConverter Endianness Pin
dybs28-Jun-11 12:56
Memberdybs28-Jun-11 12:56 
GeneralRe: BitConverter Endianness Pin
BobJanova28-Jun-11 13:12
MemberBobJanova28-Jun-11 13: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.