Click here to Skip to main content
15,921,840 members
Home / Discussions / C#
   

C#

 
GeneralRe: Can't get 24 bit audio to play with directsound Pin
Jammer31-Mar-08 10:53
Jammer31-Mar-08 10:53 
Generalvisual Studio 2005 class diagram Pin
netJP12L17-Jan-08 6:28
netJP12L17-Jan-08 6:28 
GeneralRe: visual Studio 2005 class diagram Pin
ChrisKo17-Jan-08 8:02
ChrisKo17-Jan-08 8:02 
GeneralRe: visual Studio 2005 class diagram Pin
netJP12L17-Jan-08 9:29
netJP12L17-Jan-08 9:29 
QuestionCreateDelegate with a static Dictionary<string, delegate="">, followed by DynamicInvoke</string,> Pin
Leonardo Pelisoli17-Jan-08 3:54
Leonardo Pelisoli17-Jan-08 3:54 
GeneralRe: CreateDelegate with a static Dictionary, followed by DynamicInvoke Pin
Skippums17-Jan-08 5:30
Skippums17-Jan-08 5:30 
GeneralRe: CreateDelegate with a static Dictionary, followed by DynamicInvoke Pin
Leonardo Pelisoli19-Jan-08 12:37
Leonardo Pelisoli19-Jan-08 12:37 
GeneralRe: CreateDelegate with a static Dictionary, followed by DynamicInvoke Pin
Skippums21-Jan-08 4:44
Skippums21-Jan-08 4:44 
It is my understanding that delegates are by design bound upon creation. Therefore, you either need to have the object being bound in your static constructor, or you need to use reflection.

Another alternative that may help is a hybrid of the two, where you would add a value to the dictionary so you keep BOTH the delegate AND the method info. Then, whenever you call the method that needs to use the delegate, check if the delegate is null, and if so, bind the delegate at that time and save it in the dictionary. Since dictionary lookup is an O(1) operation, the only noticable performance penalty would occur the first time you called the method. Alternatively, you could do this work in the instance constructor for the class, which would eliminate the slight overhead in the methods that use the information. Anyway, let me know if this will work for you.

Sounds like somebody's got a case of the Mondays

-Jeff

GeneralRe: CreateDelegate with a static Dictionary, followed by DynamicInvoke Pin
Leonardo Pelisoli27-Jan-08 7:15
Leonardo Pelisoli27-Jan-08 7:15 
GeneralComboBox Scrollwheel disable Pin
R.Myers17-Jan-08 3:41
R.Myers17-Jan-08 3:41 
GeneralRe: ComboBox Scrollwheel disable Pin
DaveyM6917-Jan-08 4:27
professionalDaveyM6917-Jan-08 4:27 
GeneralRe: ComboBox Scrollwheel disable Pin
DaveyM6917-Jan-08 5:00
professionalDaveyM6917-Jan-08 5:00 
GeneralRe: ComboBox Scrollwheel disable Pin
R.Myers17-Jan-08 9:09
R.Myers17-Jan-08 9:09 
Generalrtb / rich text box Pin
Member 394658217-Jan-08 3:40
Member 394658217-Jan-08 3:40 
GeneralRe: rtb / rich text box Pin
Luc Pattyn17-Jan-08 3:55
sitebuilderLuc Pattyn17-Jan-08 3:55 
Generaldisplay image located on client Pin
Chazzysb17-Jan-08 3:34
Chazzysb17-Jan-08 3:34 
GeneralCrystal report stored procedure server location Pin
Scalee17-Jan-08 2:54
Scalee17-Jan-08 2:54 
GeneralRe: Crystal report stored procedure server location Pin
Chazzysb17-Jan-08 3:44
Chazzysb17-Jan-08 3:44 
GeneralChange Components icon Pin
Abhijit Jana17-Jan-08 2:32
professionalAbhijit Jana17-Jan-08 2:32 
QuestionRe: Change Components icon Pin
TJoe17-Jan-08 4:03
TJoe17-Jan-08 4:03 
QuestionWPF - Which Components? Pin
Tomerland17-Jan-08 2:31
Tomerland17-Jan-08 2:31 
AnswerRe: WPF - Which Components? Pin
Philipp Sumi17-Jan-08 2:40
Philipp Sumi17-Jan-08 2:40 
AnswerRe: WPF - Which Components? Pin
DaveyM6917-Jan-08 2:44
professionalDaveyM6917-Jan-08 2:44 
AnswerRe: WPF - Which Components? Pin
Tomerland17-Jan-08 2:46
Tomerland17-Jan-08 2:46 
GeneralKey pressed Pin
t_nedelchev17-Jan-08 1:38
t_nedelchev17-Jan-08 1:38 

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.