2. The sum of all real solutions of the equation $x^{2}-2012|x|+2013=0$ is ( ).
(A) -2012
(B) 0
(C) 2012
(D) 2013
2. B.

If $x_{0}$ is a real solution to the given equation, then $-x_{0}$ is also a real solution to the equation. Therefore, the sum of all real solutions to the equation is 0.