Assume a differential of the form $df(x,y) = X(x,y) \,dx + Y(x,y) \,dy$. If $\oint\ df=0$, it's easy to see that $\frac{\partial X}{\partial y} = \frac{\partial Y}{\partial x}$, which can be seen using Greene's theorem.
However, I want to show the stronger case that the line integral being $0$ implies $X = \frac{\partial f}{\partial x}$, and $Y = \frac{\partial f}{\partial y}$, making $df$ a total differential. Is this true, and how do you prove this?