Which method will return all nodes of an XDocument?
A.
doc.DescendantNodes();
B.
doc.Descendants();
C.
doc.Root.Allnodes();
D.
doc.GetAllnodes();
Explanation:
public IEnumerable<XNode> DescendantNodes() Returns a collection of the descendant nodes for this document or element, in document order.
public IEnumerable<XElement> Descendants() Returns a collection of the descendant elements for this document or element, in document order.
http://stackoverflow.com/questions/23849946/xdocument-descendants-verse-descendantnodes
Descendants returns only descendant elements, while DescendantNodes returns all types of nodes (elements, attributes, text nodes, comments, etc)