Click here to Skip to main content
15,071,729 members
Home / Discussions / C#
   

C#

 
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 
Ah, ok, so if I'm to understand, its more like:

HalfNote.Render -> call base.Func1()
QuaterNote.Render -> call base.Func2()

In that case, I'd *still* say the 2nd method is preferable

1) you have one base function to maintain vs two (or more)
2) base.Func(HeadTypes.Filled) and base.Func(HeadTypes.Unfilled) looks and feels cleaner to me

On the other hand, if you are drawing a *lot* (like 10's of thousands) of these notes and need to squeeze out every single iota of performance then the first method would probably be better since you can get rid of the switch and its associated jumps. From the code you posted, you have a *bit* of room for other improvements too, but getting rid of the switch for performance reasons will only come into play if you are calling these functions a *lot* (like 10's of thousands of times).
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 
GeneralRe: Read from Byte Array Pin
DJ24528-Jun-11 23:57
MemberDJ24528-Jun-11 23:57 
GeneralRe: Read from Byte Array Pin
lukeer29-Jun-11 0:05
Memberlukeer29-Jun-11 0:05 
GeneralRe: Read from Byte Array Pin
DJ24529-Jun-11 0:23
MemberDJ24529-Jun-11 0:23 
QuestionGet one type of elements from dictionary Pin
Mc_Topaz27-Jun-11 3:01
MemberMc_Topaz27-Jun-11 3:01 
AnswerRe: Get one type of elements from dictionary Pin
musefan27-Jun-11 3:08
Membermusefan27-Jun-11 3:08 
GeneralRe: Get one type of elements from dictionary Pin
Mc_Topaz27-Jun-11 3:16
MemberMc_Topaz27-Jun-11 3:16 
GeneralRe: Get one type of elements from dictionary Pin
BobJanova27-Jun-11 3:56
MemberBobJanova27-Jun-11 3:56 
AnswerRe: Get one type of elements from dictionary Pin
Keith Barrow27-Jun-11 3:28
professionalKeith Barrow27-Jun-11 3:28 

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.