Example 1 Find $\sum_{k=1}^{n} k^{2} \mathrm{C}_{n}^{k}$.
(23rd Putnam Mathematical Competition)
Analysis: In this problem, there is a variable $k^{2}$ before $\mathrm{C}_{n}^{k}$, therefore, it is necessary to use identity (III) twice to transform to $n$, then the binomial theorem can be applied to solve it.
Solution: From the basic identities (III) and (V), we get
$$
\begin{array}{l}
\sum_{k=1}^{n} k^{2} \mathrm{C}_{n}^{k}=n \sum_{k=1}^{n} k \mathrm{C}_{n-1}^{k-1} \\
=n \sum_{k=1}^{n}(k-1) \mathrm{C}_{n-1}^{k-1}+n \sum_{k=1}^{n} \mathrm{C}_{n-1}^{k-1} \\
=n(n-1) \sum_{k=2}^{n} \mathrm{C}_{n-2}^{k-2}+n \times 2^{n-1} \\
=n(n-1) 2^{n-2}+2 n \times 2^{n-2} \\
=n(n+1) 2^{n-2}
\end{array}
$$