Dim Data As String() = {"a", "b", "d", "c"}
Dim Query = From O In Data Where O = "a" Order By O Descending '这就是核心
'输出信息
For Each QItem In Query
Console.WriteLine(QItem)
Next
Dim QueryString() As String = {"One", "Two", "Three", "Four", "Five"}
Dim ThisQuery = From StringValue In QueryString Where (StringValue.Length > 3) Order By StringValue.Length Select StringValue
For Each QItem In ThisQuery
Console.WriteLine(QItem)
Next
Console.ReadKey()
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7220876/viewspace-448813/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7220876/viewspace-448813/