Anyone know why Delegate.BeginInvoke isn't supported on Silverlight? -


the msdn docs state:

in silverlight, begininvoke method automatically defined on delegate types throws notsupportedexception, cannot use make asynchronous method calls on thread pool threads.

but doesn't state why.

anyone have idea?

complex question.
begininvoke method declarations delegates looks like

[methodimpl(0, methodcodetype=methodcodetype.runtime)] public virtual iasyncresult begininvoke(...some params...);  

most important part here methodcodetype.runtime.

specifies method implementation provided runtime.

more runtime implementation may read in this pretty old still actual article.

silverlight cross platform framework. should implement own platform independent (i.e. managed) mechanism of asynchronous execution (threading , dispatching). that's story of managed deployment.current.dispatcher class , begininvoke method might called silverlight.

btw both dispatcher , dispatcheroperation classes cls compliant guarantees work @ different cli implementations. short answer question

why delegate.begininvoke isn't supported on silverlight?

is because it's time create cross platform applications :)


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -