/// <summary> /// Modifies the current set so that it contains only elements that are also in a specified collection. /// </summary> /// <param name="other">The collection to compare to the current set.</param> public void IntersectWith(IEnumerable <T> other) { var result = ImmutableHashSet <T> .Intersect(other, this.Origin); this.Apply(result); }