XPathSelectElement vs Descendants
问题 I was wondering if there are any performance differences when using simple queries as: var x = document.XPathSelectElement("actors/actor") vs var x = document.Descendants("actors").Descendants("actor") 回答1: Note that this var x = document.Elements("actors").Elements("actor").FirstOrDefault(); is the equivalent of your first statement. There will be a performance difference, because the methods are doing very different things under the hood. However, optimising purely in-memory operations is a