bool isChildOf(Domain other) { var current = parent; while (current != null) { if (current == other) return true; current = current.parent; } return false; }