2. Let the complex number $z=\frac{1+\mathrm{i}}{1-\mathrm{i}}$ (where $\mathrm{i}$ is the imaginary unit). Then $\mathrm{C}_{2014}^{0}+\mathrm{C}_{2014}^{1} z+\cdots+\mathrm{C}_{2014}^{2014} z^{2014}=(\quad)$.
(A) $2^{1007} \mathrm{i}$
(B) $-2^{1007} \mathrm{i}$
(C) $-2^{1005}$
(D) $-2^{1004}$
2. B.

From the problem, we have $z=\mathrm{i}$.
Notice that, $(1+\mathrm{i})^{2}=2 \mathrm{i}$.
Thus, the required expression is
$$
\begin{array}{l}
(1+z)^{2014}=(1+\mathrm{i})^{2014}=(2 \mathrm{i})^{1007} \\
=(2 \mathrm{i})^{2 \times 503} \times 2 \mathrm{i}=-2^{1007} \mathrm{i} .
\end{array}
$$