我有两个以下的LINQ查询,我还没有完全了解LINQ,所以下面两种方法有什么区别?这2个XML LINQ查询有什么区别?
有没有一种方法比另一种更好?
ChequeDocument.Descendants("ERRORS").Where(x=>(string)x.Attribute("D") == "").Count();
(from x in ChequeDocument.Descendants("ERRORS") where
(string)x.Attribute("D") == ""
select x).Count())