4. When $x-y=1$, the value of $x^{4}-x y^{3}-x^{3} y-3 x^{2} y$ $+3 x y^{2}+y^{4}$ is ( ).
(A) -1
(B) 0
(C) 1
(D) 2
4. C.

When $x-y=1$,
$$
\begin{array}{l}
x^{3}-y^{3}=(x-y)\left(x^{2}+x y+y^{2}\right) \\
=x^{2}+x y+y^{2}=(x-y)^{2}+3 x y=1+3 x y,
\end{array}
$$

Therefore, $x^{4}-x y^{3}-x^{3} y-3 x^{2} y+3 x y^{2}+y^{4}$
$$
\begin{array}{l}
=x\left(x^{3}-y^{3}\right)+y\left(y^{3}-x^{3}\right)+3 x y(y-x) \\
=(x-y)\left(x^{3}-y^{3}\right)-3 x y(x-y) \\
=1+3 x y-3 x y=1 .
\end{array}
$$