5. Given that $M$ and $N$ are two distinct points on a plane, there are $m$ lines passing through $M$ but not through $N$ (called $M$-type lines), and $n$ lines passing through $N$ but not through $M$ (called $N$-type lines). If each $M$-type line intersects with each $N$-type line, and each line is divided into several segments by its intersection points along with point $M$ or $N$, then the total number of segments formed by these $m+n$ lines is ( ).
(A) $2 m n$
(B) $(m+1)(n+1)$
(C) $2(m n+m+n)$
(D) $2(m+1)(n+1)$
5. (C).

On each line of class $M$, there are $n$ intersection points, these $n$ points along with point $M$ divide the line into $n+2$ segments; similarly, each line of class $N$ is divided into $m+2$ segments by its $m$ intersection points along with point $N$, so the total number of segments is $m(n+2)+n(m+2)=2(m n+m+n)$.