Click here to Skip to main content
15,913,055 members
Home / Discussions / C#
   

C#

 
QuestionDelegates are trying to make me look stupid Pin
Rob Philpott15-Oct-08 4:17
Rob Philpott15-Oct-08 4:17 
AnswerRe: Delegates are trying to make me look stupid Pin
Ennis Ray Lynch, Jr.15-Oct-08 5:35
Ennis Ray Lynch, Jr.15-Oct-08 5:35 
GeneralRe: Delegates are trying to make me look stupid Pin
Rob Philpott15-Oct-08 5:37
Rob Philpott15-Oct-08 5:37 
GeneralRe: Delegates are trying to make me look stupid Pin
Ennis Ray Lynch, Jr.15-Oct-08 6:14
Ennis Ray Lynch, Jr.15-Oct-08 6:14 
AnswerRe: Delegates are trying to make me look stupid Pin
Le centriste15-Oct-08 6:25
Le centriste15-Oct-08 6:25 
GeneralRe: Delegates are trying to make me look stupid Pin
Rob Philpott16-Oct-08 1:37
Rob Philpott16-Oct-08 1:37 
AnswerRe: Delegates are trying to make me look stupid Pin
Simon P Stevens15-Oct-08 23:32
Simon P Stevens15-Oct-08 23:32 
GeneralRe: Delegates are trying to make me look stupid Pin
Rob Philpott16-Oct-08 1:33
Rob Philpott16-Oct-08 1:33 
Wow, that's some digging. Thanks for the reply.

I've sort of concluded the following, but it may all be wrong.

The Invoke method effectively just calls the method on the same thread so could be replaced with base.Thing(), which calls the base class just as you'd expect.

BeginInvoke though on an instance delegate having a 'this' pointer referring to the child class seems to be activating the polymorphic mechanism and determining that Thing() is overriden and using the override instead. It's kind of valid.

So I guess the difference is that Invoke just calls a method, but BeginInvoke will call the method or preferentially any override. It is an odd one though, because one naturally assumes they'd call the same method ultimately.

Thanks again for your help.

Regards,
Rob Philpott.

Questionis it such a thing LinkedLists in C# ? Pin
nesfrank15-Oct-08 3:38
nesfrank15-Oct-08 3:38 
AnswerRe: is it such a thing LinkedLists in C# ? Pin
Simon P Stevens15-Oct-08 3:45
Simon P Stevens15-Oct-08 3:45 
AnswerRe: is it such a thing LinkedLists in C# ? Pin
Kevin McFarlane15-Oct-08 3:46
Kevin McFarlane15-Oct-08 3:46 
AnswerRe: is it such a thing LinkedLists in C# ? Pin
Giorgi Dalakishvili15-Oct-08 3:46
mentorGiorgi Dalakishvili15-Oct-08 3:46 
GeneralRe: is it such a thing LinkedLists in C# ? Pin
nesfrank15-Oct-08 6:29
nesfrank15-Oct-08 6:29 
GeneralRe: is it such a thing LinkedLists in C# ? Pin
Giorgi Dalakishvili15-Oct-08 6:40
mentorGiorgi Dalakishvili15-Oct-08 6:40 
GeneralRe: is it such a thing LinkedLists in C# ? Pin
nesfrank15-Oct-08 7:51
nesfrank15-Oct-08 7:51 
GeneralRe: is it such a thing LinkedLists in C# ? Pin
Dan Neely15-Oct-08 7:09
Dan Neely15-Oct-08 7:09 
GeneralRe: is it such a thing LinkedLists in C# ? Pin
nesfrank15-Oct-08 7:50
nesfrank15-Oct-08 7:50 
QuestionProblems of losing handle to stdcall-api from C#-DLL Pin
J. Holzer15-Oct-08 3:29
J. Holzer15-Oct-08 3:29 
QuestionEnable/disable buttons in Toolbar Pin
kanchoette15-Oct-08 3:24
kanchoette15-Oct-08 3:24 
AnswerRe: Enable/disable buttons in Toolbar Pin
Giorgi Dalakishvili15-Oct-08 3:29
mentorGiorgi Dalakishvili15-Oct-08 3:29 
QuestionThreads and Form Controls Pin
Programm3r15-Oct-08 2:41
Programm3r15-Oct-08 2:41 
AnswerRe: Threads and Form Controls Pin
Giorgi Dalakishvili15-Oct-08 2:49
mentorGiorgi Dalakishvili15-Oct-08 2:49 
GeneralRe: Threads and Form Controls Pin
Programm3r15-Oct-08 2:58
Programm3r15-Oct-08 2:58 
GeneralRe: Threads and Form Controls Pin
Giorgi Dalakishvili15-Oct-08 3:01
mentorGiorgi Dalakishvili15-Oct-08 3:01 
QuestionPlease Help me!!! Pin
JeremH15-Oct-08 1:59
JeremH15-Oct-08 1:59 

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.