M
Miro
I am trying to understand delegates and I think I do understand them ...
just hoping if someone can tell me im on the right track.
So far what I have read is that a Delegate is an Asynchronus call to a
method or function or whatever...
So basically you create an object that references the address of the
meathod.
By calling this delegate - you get a 'return' right away so your code can
continue and the delegate runs in a different thread doing whatever the
function / meathod is required.
Is this the correct assumption?
The example in the book is pretty simple ( its a writeline command ).
So as far as 'uses' for delegates ( if im on the right track )...its useful
when you have a lot to process, but do not want to do it in the main thread
( or the app will temporarily stop working ), you use a delegate to call the
meathod in a different thread.
Is this correct?
Thanks,
Miro
just hoping if someone can tell me im on the right track.
So far what I have read is that a Delegate is an Asynchronus call to a
method or function or whatever...
So basically you create an object that references the address of the
meathod.
By calling this delegate - you get a 'return' right away so your code can
continue and the delegate runs in a different thread doing whatever the
function / meathod is required.
Is this the correct assumption?
The example in the book is pretty simple ( its a writeline command ).
So as far as 'uses' for delegates ( if im on the right track )...its useful
when you have a lot to process, but do not want to do it in the main thread
( or the app will temporarily stop working ), you use a delegate to call the
meathod in a different thread.
Is this correct?
Thanks,
Miro