我很新的LINQ和我有麻烦转换后面的LINQ表达式:LINQ的子名单问题
Dim returnedInstructions As List(Of Integer) = New List(Of Integer)
For Each j As Job In response.Jobs
For Each i As Instruction In j.Instructions
returnedInstructions.Add(i.InstructionId)
Next
Next
任何帮助表示赞赏。
我以前试过这个确切的例子,但它返回IEnumberable>而不是IEnumberable 。 –
Owen
2009-04-29 12:46:11
你确定这是*完全*你试过了吗?双从应该转化为SelectMany的调用(按照David的回答) - ToList将返回列表而不是IEnumerable –
2009-04-29 13:00:07