2. (1982 National High School League Question) The area of the figure enclosed by the curve determined by the equation $|x-1|+|y-1|=1$ is ( ).
A. 1
B. 2
C. $\pi$
D. 4
2. B. Reason: For expressions containing absolute values, discuss cases to remove the absolute value symbols, resulting in four line segments:
$$
\left\{\begin{array} { l } 
{ x - 1 \geqslant 0 , } \\
{ y - 1 \geqslant 0 , } \\
{ x + y \geqslant 3 . }
\end{array} \left\{\begin{array} { l } 
{ x - 1 \leqslant 0 , } \\
{ y - 1 \leqslant 0 , } \\
{ x + y = 1 . }
\end{array} \left\{\begin{array} { l } 
{ x - 1 \leqslant 0 , } \\
{ y - 1 \geqslant 0 , } \\
{ y = x + 1 . }
\end{array} \left\{\begin{array}{l}
x-1 \geqslant 0, \\
y-1 \leqslant 0, \\
y=x-1 .
\end{array}\right.\right.\right.\right.
$$

The curves determined by them form a square with vertices at $(1,0),(2,1),(1,2),(0,1)$, with a side length of $\sqrt{2}$, so the area is
2.