# How does discrete spectral moment relate to continuous spectral moment?

It is said in discrete/digital signal processing that $$r$$th spectral moment of signal $$x[n]$$ is defined as: $$\sum_{n=-\infty}^{\infty}n^r x[n]$$ But how does this relate to usual continuous $$r$$th spectral moment of $$x(t)$$ which seems to be $$\int\limits_{f=-\infty}^{\infty}f^r|X(f)|\,\mathrm df$$ where $$f$$ is frequency, with $$X(f)$$ representing fourier transform of $$x(t)$$ to frequency domain? (I could have gotten coefficients and exponents wrong for the continuous one, so please feel free to correct me.)