有没有办法自动从linq方法语法转换为查询语法?
例如为: 我想自动转换它:
var aux = Directory.EnumerateDirectories(@"c:\")
.Where(directory => directory.Contains("xxx"))
.ToList();
到它:
var aux = (from directory in Directory.EnumerateDirectories(@"c:\")
where directory.Contains("xxx")
select directory).ToList();