小编Ale*_*ola的帖子

是否可以在PCL中使用.AsParallel扩展方法?

我在Portable Class Library类中遇到了问题..AsParallel()虽然System.Linq被引用但似乎我不能使用扩展方法.这是代码:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PortableClassLibrary1
{
    public class Class1
    {
        public Class1()
        {
            var list = new List<String>();                
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

list没有AsParallel()方法,它只有AsQueryableAsEnumerable.

目标框架是.NET 4.5和更高版本,Phone 8,Windows Store App(Win 8)及更高版本.有任何想法吗?

c# linq task-parallel-library portable-class-library

10
推荐指数
1
解决办法
516
查看次数