4. Given that $a, b, c, d$ are four different rational numbers, and $(a+c)(a+d)=1,(b+c)(b+d)=1$. Then the value of $(a+c)(b+c)$ is $(\quad)$.
(A) 2
(B) 1
(C) 0
(D) -1
4. D.

From the problem, we have
$$
\begin{array}{l}
a^{2}+(c+d) a+c d-1=0 . \\
b^{2}+(c+d) b+c d-1=0 .
\end{array}
$$

Then \(a, b\) are the roots of the equation \(x^{2}+(c+d) x+c d-1=0\). Therefore, we have
$$
a+b=-(c+d), \quad a b=c d-1 .
$$

Thus, \((a+c)(b+c)=a b+(a+b) c+c^{2}\).
$$
\text { Hence }(a+c)(b+c)=-1 \text {. }
$$