$\newcommand{\argmin}{\mathrm{arg\,min}}$ Suppose $f: \mathbf{R}^n \to \mathbf{R}$ is a convex function, and suppose $C = B_2^n$, the (closed) unit ball in the Euclidean norm in $\mathbf{R}^n$. Let $P_C$ denote the projection operator onto $C$. When is it true that $$ \argmin_{x \in C}~f(x) = P_C(\argmin_{x \in \mathbf{R}^n}~f(x))? $$ In particular I'm interested in necessary and sufficient conditions for this to hold. A sufficient condition, is clearly that $\argmin_{x \in \mathbf{R}^n} f(x) \in C$. But can we do better?
A more general question is what about other sets $C$ which are not the unit ball.