2. The arithmetic sequence $\left\{a_{k}\right\}$ has a total of $2 n+1$ terms $(n \in$ $\mathbf{N}_{+}$), where the sum of all odd-numbered terms is 310, and the sum of all even-numbered terms is 300. Then the value of $n$ is ( ).
(A) 30
(B) 31
(C) 60
(D) 61
2. A.

Since $\left\{a_{k}\right\}$ is an arithmetic sequence, and
$$
\left\{\begin{array}{l}
a_{1}+a_{3}+\cdots+a_{2 n+1}=310, \\
a_{2}+a_{4}+\cdots+a_{2 n}=300,
\end{array}\right.
$$

Therefore, $\left\{\begin{array}{l}(n+1) a_{n+1}=310, \\ n a_{n+1}=300 .\end{array}\right.$
Dividing the two equations yields $\frac{n+1}{n}=\frac{31}{30} \Rightarrow n=30$.