Which version of Silverlight Supports Task parallel Library

时光总嘲笑我的痴心妄想 提交于 2019-12-02 12:16:28

问题


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.



来源:https://stackoverflow.com/questions/18396139/which-version-of-silverlight-supports-task-parallel-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!