MSDN地址:ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.chs/dv_linq/html/7c427bbc-450e-44ef-ad16-a1c5f624d094.htmC#作为.Net的首席语言,对LINQ的支持居然远远不如VB.NET...........CSDN没有预览功能,估计帖出来格式不正确,大家自己在看MSDN上看吧:查询表达式语法表
下表列出了具有等效查询表达式子句的标准查询运算符。C# 和 Visual Basic 编程语言没有为相同方法提供专用查询表达式语法。下表列出了同时适用于这两种语言的语法。方法
 C# 查询表达式语法
 Visual Basic 查询表达式语法
 
All<(Of <(TSource>)>)(IEnumerable<(Of <(TSource>)>), Func<(Of <(TSource, Boolean>)>)) 
 不适用
 Aggregate … In … Into All(…) (有关更多信息,请参见 Aggregate 子句 (Visual Basic)。)
 
Any<(Of <(TSource>)>)(IEnumerable<(Of <(TSource>)>)) 
 不适用
 Aggregate … In … Into Any() (有关更多信息,请参见 Aggregate 子句 (Visual Basic)。)
 
Average(IEnumerable<(Of <(Decimal>)>)) 
 不适用
 Aggregate … In … Into Average() (有关更多信息,请参见 Aggregate 子句 (Visual Basic)。)
 
Cast<(Of <(TResult>)>)(IEnumerable) 
 使用显式类型化的范围变量,例如:from int i in numbers (有关更多信息,请参见 from 子句(C# 参考)。)
 From … As … (有关更多信息,请参见 From 子句 (Visual Basic)。)
 
Count<(Of <(TSource>)>)(IEnumerable<(Of <(TSource>)>)) 
 不适用
 Aggregate … In … Into Count() (有关更多信息,请参见 Aggregate 子句 (Visual Basic)。)
 
Distinct<(Of <(TSource>)>)(IEnumerable<(Of <(TSource>)>)) 
 不适用
 Distinct (有关更多信息,请参见 Distinct 子句 (Visual Basic)。)
 
GroupBy()()() 
 group … by - 或 -group … by … into … (有关更多信息,请参见 group 子句(C# 参考)。)
 Group … By … Into … (有关更多信息,请参见 Group By 子句 (Visual Basic)。)
 
GroupJoin<(Of <(TOuter, TInner, TKey, TResult>)>)(IEnumerable<(Of <(TOuter>)>), IEnumerable<(Of <(TInner>)>), Func<(Of <(TOuter, TKey>)>), Func<(Of <(TInner, TKey>)>), Func<(Of <(TOuter, IEnumerable<(Of <(TInner>)>), TResult>)>)) 
 join … in … on … equals … into … (有关更多信息,请参见 join 子句(C# 参考)。)
 Group Join … In … On … (有关更多信息,请参见 Group Join 子句 (Visual Basic)。)
 
Join<(Of <(TOuter, TInner, TKey, TResult>)>)(IEnumerable<(Of <(TOuter>)>), IEnumerable<(Of <(TInner>)>), Func<(Of <(TOuter, TKey>)>), Func<(Of <(TInner, TKey>)>), Func<(Of <(TOuter, TInner, TResult>)>)) 
 join … in … on … equals … (有关更多信息,请参见 join 子句(C# 参考)。)
 From x In …, y In … Where x.a = b.a - 或 -Join … [As …]In … On … (有关更多信息,请参见 Join 子句 (Visual Basic)。)
 
LongCount<(Of <(TSource>)>)(IEnumerable<(Of <(TSource>)>)) 
 不适用
 Aggregate … In … Into LongCount() (有关更多信息,请参见 Aggregate 子句 (Visual Basic)。)
 
Max(IEnumerable<(Of <(Decimal>)>)) 
 不适用
 Aggregate … In … Into Max() (有关更多信息,请参见 Aggregate 子句 (Visual Basic)。)
 
Min(IEnumerable<(Of <(Decimal>)>)) 
 不适用
 Aggregate … In … Into Min() (有关更多信息,请参见 Aggregate 子句 (Visual Basic)。)
 
OrderBy<(Of <(TSource, TKey>)>)(IEnumerable<(Of <(TSource>)>), Func<(Of <(TSource, TKey>)>)) 
 orderby (有关更多信息,请参见 orderby 子句(C# 参考)。)
 Order By (有关更多信息,请参见 Order By 子句 (Visual Basic)。)
 
OrderByDescending<(Of <(TSource, TKey>)>)(IEnumerable<(Of <(TSource>)>), Func<(Of <(TSource, TKey>)>)) 
 orderby … descending (有关更多信息,请参见 orderby 子句(C# 参考)。)
 Order By … Descending (有关更多信息,请参见 Order By 子句 (Visual Basic)。)
 
Select 
 select (有关更多信息,请参见 select 子句(C# 参考)。)
 Select (有关更多信息,请参见 Select 子句 (Visual Basic)。)
 
SelectMany 
 多个 from 子句。(有关更多信息,请参见 from 子句(C# 参考)。)
 多个 From 子句(有关更多信息,请参见 From 子句 (Visual Basic)。)
 
Skip<(Of <(TSource>)>)(IEnumerable<(Of <(TSource>)>), Int32) 
 不适用
 Skip (有关更多信息,请参见 Skip 子句 (Visual Basic)。)
 
SkipWhile 
 不适用
 Skip While (有关更多信息,请参见 Skip While 子句 (Visual Basic)。)
 
Sum(IEnumerable<(Of <(Decimal>)>)) 
 不适用
 Aggregate … In … Into Sum() (有关更多信息,请参见 Aggregate 子句 (Visual Basic)。)
 
Take<(Of <(TSource>)>)(IEnumerable<(Of <(TSource>)>), Int32) 
 不适用
 Take (有关更多信息,请参见 Take 子句 (Visual Basic)。)
 
TakeWhile 
 不适用
 Take While (有关更多信息,请参见 Take While 子句 (Visual Basic)。)
 
ThenBy<(Of <(TSource, TKey>)>)(IOrderedEnumerable<(Of <(TSource>)>), Func<(Of <(TSource, TKey>)>)) 
 orderby …, … (有关更多信息,请参见 orderby 子句(C# 参考)。)
 Order By …, … (有关更多信息,请参见 Order By 子句 (Visual Basic)。)
 
ThenByDescending<(Of <(TSource, TKey>)>)(IOrderedEnumerable<(Of <(TSource>)>), Func<(Of <(TSource, TKey>)>)) 
 orderby …, … descending (有关更多信息,请参见 orderby 子句(C# 参考)。)
 Order By …, … Descending (有关更多信息,请参见 Order By 子句 (Visual Basic)。)
 
Where 
 where (有关更多信息,请参见 where 子句(C# 参考)。)
 Where (有关更多信息,请参见 Where 子句 (Visual Basic)。)