# Projective subvarieties of a quasiprojective variety

Let $$X$$ be a quasiprojective variety over $$\mathbf C$$. Take the union of all projective subvarieties $$W \subseteq X$$ that have dimension at least $$1$$. Is the result Zariski closed?

(I was wondering this in the particular setting $$X = \mathcal M_g$$, where the projective subvarieties have been the subject of some study. But the general question seems natural as well.)

No. For example take $$X = \mathbb{A}^1 \times \mathbb{P}^1$$ minus one point, say $$(x,y)$$. Then $$W = (\mathbb{A}^1 \setminus x) \times \mathbb{P}^1$$ is not closed.