Which version of Silverlight Supports Task paralle

2019-02-28 12:12发布

问题:

Though TPL is widely accepted as a feature of C# 4.0 , but heard that it is not supported on SL4, but SL5.

Could not find any solid evidence of it.

So why the do MicroSoft implemented a feature in WPF but not Silverlight, though both sl4 and wpf4 released around same time.

回答1:

If you need TCL in Silverlight 4 you can add the "Microsoft.Bcl" and "Microsoft.Bcl.Async" nuGet packages to your project.

They implement part of what TCL delivers in .net. More info can be found here

Don't forget you have to use the TaskEx class instead.

Hoped it helped.