$f$ is a continuous function from $(0,\infty) \to R$ with $f(x) \to a$ as $x \to \infty$. Can I write:
$$\lim_{X\rightarrow \infty}\lim_{n\rightarrow \infty}\sum_{i=1}^{n}f(X\cdot i/n) \cdot (1/n)= a$$
So basically, I am taking the limit on $X \to \infty$ inside the sum as it is a finite sum for a fixed $n$. That should be allowed, I believe.