开发者

Equivalent lambda syntax for linq query

I am having a mind-free开发者_如何学JAVAze here, but I cant seem to find the equivalent lambda syntax for -

string[] a = {"a","b","c"}; 
string[] b = {"1","2","3"}; 

var x = from a1 in a
        from b1 in b
        select new{a1, b1};


var x = a.SelectMany(a1=>b.Select(b1=>new {a1,b1}));


ReSharper says:

var x = a.SelectMany(a1 => b, (a1, b1) => new { a1, b1 });
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜