5 Given the parabola $x^{2}=2 p y(p>0)$, two tangent lines are drawn from the point $M\left(0,-\frac{p}{2}\right)$ to the parabola, with $A$ and $B$ being the points of tangency. The length of the line segment $A B$ is ( ).
(A) $3 p$
(B) $\frac{5}{2} p$
(C) $2 p$
(D) $\frac{3}{2} p$
(5) The equation of the tangent line is $y=k x-\frac{p}{2}$, substituting into the parabola equation gives
$$
\frac{x^{2}}{2 p}=k x-\frac{p}{2},
$$

which simplifies to
$$
x^{2}-2 p k x+p^{2}=0
$$

There is one real root, so $4 p^{2} k^{2}-4 p^{2}=0$, solving gives $k= \pm 1, x= \pm p$, thus the length of $A B$ is $2 p$. Therefore, the answer is $\mathrm{C}$.