public NodeRange(Node start, Node end) { if (start.Document != end.Document) throw new InvalidOperationException("Cannot create a node range between nodes in different documents."); Document = start.Document; Start = start; End = end; }