Jon*_*eet 16
只需用变量本身声明它:
var query = from string text in collection
where text.Length > 5
select text.ToUpper();
Run Code Online (Sandbox Code Playgroud)
这将转化为:
var query = collection.Cast<string>()
.Where(text => text.Length > 5)
.Select(text => text.ToUpper());
Run Code Online (Sandbox Code Playgroud)