# dimension of affine variety intersected with an open set

I was wondering if someone could clarify the following. Let $W$ be an affine variety (which I don't assume to be irreducible) in $\mathbb{C}^n$. Let $U$ be an open (in Zariski topology) and suppose $W \cap U$ is non-empty. Does it then follow that $W \cap U$ has dimension $(\dim W)$?

• Remark: It is true if $W$ is irreducible. – HeinrichD Mar 20 '17 at 19:29
Consider the affine variety, $$W = V(xz, yz) \subset \mathbb C^3.$$ $W$ is the union of the $z$-axis and the plane $z = 0$. The dimension of $W$ is two.
Take $U$ to be the complement of the $z = 0$ plane. So $W \cap U$ is the $z$-axis with the origin removed. This has dimension one.