Example 2 Find the value of the sum $\sum_{k=1}^{n} k^{2} C_{n}^{k}=C_{n}^{1}+2^{2} C_{n}^{2}+\cdots+n^{2} C_{n}^{n}$.
Solution: From $r C_{n}^{r}=n C_{n-1}^{r-1}$, we know,
$$
\begin{aligned}
& \sum_{k=1}^{n} k^{2} C_{n}^{k}=n \sum_{k=1}^{n} k C_{n-1}^{k-1} \\
= & n \sum_{k=1}^{n}[(k-1)+1] C_{n-1}^{k-1} \\
= & n(n-1) \sum_{k=2}^{n} C_{n-2}^{k-2}+n \cdot 2^{n-1} \\
= & n(n-1) \cdot 2^{n-2}+2 n \cdot 2^{n-2} \\
= & n(n+1) \cdot 2^{n-2} .
\end{aligned}
$$