6. $\overline{a b}$ and $\overline{b a}$ represent two-digit integers, then the number of $\overline{a b}$ that satisfy the equation $(a+b) x^{2}-\overline{a b} x+\overline{b a}=0$ with both roots being integers is ( ).
(A)0
(B) 2
(C) 4
(D) 6
6. B.

Let the two integer roots be $x_{1}, x_{2}$, then
$$
x_{1}+x_{2}=\frac{10 a+b}{a+b}, x_{1} x_{2}=\frac{10 b+a}{a+b} \text {. }
$$

We have $x_{1}+x_{2}+x_{1} x_{2}=11$.
$$
\begin{array}{l}
\left(x_{1}+1\right)\left(x_{2}+1\right)=12=( \pm 1)( \pm 12) \\
=( \pm 2)( \pm 6)=( \pm 3)( \pm 4) .
\end{array}
$$

When $\left\{\begin{array}{l}x_{1}=2, \\ x_{2}=3\end{array}\right.$, substituting into the above equation gives $5 a=4 b$. Hence $\overline{a b}=45$.
When $\left\{\begin{array}{l}x_{1}=1 \\ x_{2}=5\end{array}\right.$, substituting into the above equation gives $4 a=5 b$. Hence $\overline{a b}=54$.