Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ajax/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linq查询从C#到VB:NET的转换_C#_Vb.net_Linq - Fatal编程技术网

Linq查询从C#到VB:NET的转换

Linq查询从C#到VB:NET的转换,c#,vb.net,linq,C#,Vb.net,Linq,我需要转换Linq查询的帮助。我尝试过在线转换工具,但没有运气。。。 问题是: var orderedData =(from d in collezione group d by d.Gruppo into g orderby g.Key from d in g select new[] {d}.Union(g.Where(c => c.Owner == d.Comp)) into withChildre

我需要转换Linq查询的帮助。我尝试过在线转换工具,但没有运气。。。 问题是:

var orderedData =(from d in collezione
              group d by d.Gruppo into g
              orderby g.Key
              from d in g
 select new[] {d}.Union(g.Where(c => c.Owner == d.Comp)) into withChildren
                          from wc in withChildren
                          orderby wc.Pos
                          select wc).Distinct();

我不确定这是否是您所需要的(由于您的问题不完整,所以这是随机拍摄):


互联网上有C#到VB.NET的转换器,可以让你在很多这类东西上领先一步……好吧,你已经告诉我们了这个问题,你需要帮助。这两件事都不是问题。问题是什么?您遇到了什么问题?最大的问题是select的行…原始c代码是否按预期工作?因为否则它根本就不会是一个转换问题。非常感谢您的重播。是的,原始代码运行良好。
Dim orderedData = From d In collezione
                  Order By d.Gruppo
                  Group d By d.Gruppo Into g = Group
                  From d In g
                  Select New With {
                      .withChildren = {d}.
                          Union(g.Where(Function(c) c.Owner = d.Comp))
                  }
Dim result = (From od In orderedData
              From wc In od.withChildren
              Order By wc.Pos
              Select wc).Distinct