This may be a really stupid question, but I've never formally learned the answer to this question.
We know that if $F'(x)=f(x)$ and if $a, b\in\Bbb R$, then $$\int_a^b f(x)dx=F(b)-F(a)$$ But what if $a,b\in\Bbb C\setminus \Bbb R$? Assuming that $F$ is defined and converges for such $a,b\in\Bbb C\setminus \Bbb R$, is $$\int_a^bf(x)dx=F(b)-F(a)\text{?}$$
If $F$ is holomorphic in a domain $U$, with $F'=f$, then for each contour $\gamma$ inside $U$, $$\int_\gamma f(z)\,dz=F(b)-F(a)$$ where $a$ and $b$ are the start and end points of $\gamma$.
This is the Fundamental Theorem of Calculus for holomorphic functions, and is in all texts on complex analysis.