The Remove operator can be called on a sequence of nodes or attributes to remove them. This method will cache a copy of the nodes or attributes in a List to eliminate the Halloween problem discussed in the previous chapter.
The Remove operator has two prototypes.
public static void Remove ( this IEnumerable<XAttribute> source )
This version is called on a sequence of attributes and removes all attributes in the source sequence.
public static void Remove<T> ( this IEnumerable<T> source ) where T : XNode
This version is called on a sequence of a specified type, which must be nodes or some type derived from nodes, and removes all nodes in the source sequence. ...