Example 6 If $S=1+\frac{1}{\sqrt{2}}+\frac{1}{\sqrt{3}}+\cdots+\frac{1}{\sqrt{10^{6}}}$, then the integer part of $S$ is ( ).
(A) 1997
(B) 1998
(C) 1999
(D) 2000
(8th "Hope Cup" Senior High School Question)
Analysis: From $\sqrt{n-1}+\sqrt{n}2\left(\sqrt{10^{6}}-1.5\right)$ $=1997,2\left(\sqrt{10^{6}}-1\right)=1998$, thus,
$$
1998<1+\frac{1}{\sqrt{2}}+\frac{1}{\sqrt{3}}+\cdots+\frac{1}{\sqrt{10^{6}}}<1999 .
$$

Therefore, the correct choice is (B).