Calculating A Line Integral Via Stokes’ theorem

Let S be the surface of the cone $$z =\sqrt{x^2 +y^2}$$ bounded by the planes $$z =0$$ and $$z =3$$ and Let C be the closed curve forming the boundary of of Surface S. A vector field $$\vec{F}$$ such that

$$\nabla \times F = x\hat{i} -y\hat{j}$$ Find the absolute value of the line integral

$$\displaystyle\int F.dr$$

So, this question was on my test, I searched the site and noticed that this question is almost identical of this How to calculate Line Integral for given Closed Curve.

Only difference being the vector fields, here $$F =x\hat{i} - y\hat{j}$$ there $$F = -x\hat{i} - y\hat{j}$$

Now, I want to solve this via stoke's theorem

The circle $$z = 3$$ is an outward boundary to the surface so, normal Vector

$$\hat{n} = \hat{k}$$

Now, Line Integral =

$$\nabla \times F.\hat{n} ds$$

$$= 0$$

But, answer given to me is $$18\pi$$.

Can anyone please check my solution and tell me whether is it correct or Not ?

Thank you.

Yes it's correct, to verify this we can use try to use a different surface such as the cone $$z=\sqrt{x^2+y^2}$$ , by defining $$g\left(x,y,z\right)=z-\sqrt{x^2+y^2}=0\:$$ our surface integral becomes $$\int _s\:\:(F.\nabla g)\:dA$$ over the surface of the cone, which by using cylinderical coordinates becomes $$\int _0^{2\pi }\int _0^3\:r^2\left(sin^2\left(\theta \right)-cos^2\left(\theta \right)\right)\:dr\:d\theta$$ which evaluates to zero.