哪个版本的Silverlight支持任务并行库 [英] Which version of Silverlight Supports Task parallel Library
问题描述
虽然TPL被广泛接受为C#4.0的一个功能,但听说它不支持SL4,但SL5。
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.
为什么MicroSoft在WPF中实现了一个特性,而不是Silverlight,虽然sl4和wpf4在同一时间发布。
So why the do MicroSoft implemented a feature in WPF but not Silverlight, though both sl4 and wpf4 released around same time.
推荐答案
如果您需要在Silverlight 4中使用TCL,您可以添加
If you need TCL in Silverlight 4 you can add the "Microsoft.Bcl" and "Microsoft.Bcl.Async" nuGet packages to your project.
它们实现了TCL提供的一部分功能在.net。
更多信息,请访问这里
They implement part of what TCL delivers in .net. More info can be found here
不要忘记你必须使用 TaskEx
类。
Don't forget you have to use the TaskEx
class instead.
这篇关于哪个版本的Silverlight支持任务并行库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!