The exact solutions of the two-dimensional Schrodinger equation for the hydrogen-like atoms confined by a potential step are obtained. The eigenvalues can be calculated from the matching condition. We generalize this quantum system to arbitrary dimensional D case.