# Moment generating function - strange fact to check

I'm reading the lecture notes of a course in statistics and I found the next:

The moment generating function is defined as $$M_X(t)=E(e^{tX})$$ Check that : $$M^{(n)}_X(t)=E(X^n)$$

Any idea where the last result is coming from?

For example if I try to do this for say a random variable with a binomial distribution I do not get that.

I assume you're trying to get at the result where $n$-th moments can be extracted from the MGF.
That is, $E \left( X^n \right)=\frac{d^n M_X}{dt^n}(0)$. (i.e. $M_X^{(n)}(0)$, not $M_X^{(n)}(t)$)