Is the square of a curve minus its diagonal affine? Let $X$ be a smooth irreducible projective algebraic curve of genus $g\geq 1$ and $S=X^2$ the surface one obtains as the cartesian product of $X$ with itself. Let $\Delta$ be the diagonal in $S$, that is to say, a copy of $X$ embedded diagonally in $X^2$. 
Is the quasi-projective surface $U=S\setminus \Delta$ affine? 
One criterion for showing affinness is showing that $\Delta$ is an ample divisor in $S$. But the self-intersection of $\Delta$ is $\Delta^2=2-2g<0$ and therefore $\Delta$ can not be ample. Does this already imply that $U$ is not affine? I guess not.
Besides, Serre's criterion provides a necessary and sufficient condition for $U$ to be affine: this is the case if and only if $H^i(U,\mathcal F)=0$ for all $i>0$ and all coherent sheaves $\mathcal F$ on $U$. But I don't know how to check this in this example. 
 A: This answer is inspired by Rita's second paragraph.
It turns out that this $U$ contains projective curves for all $g\geq 1$ and hence cannot be affine:
Embed $X$ into its Jacobian $X\hookrightarrow J$ and let $Z\subseteq J$ be the image of $X\times X$ via the map $J\times J\to J$, $(x,y)\mapsto x-y$. This contracts the diagonal of $X\times X$. If $g>1$, then $Z$ is singular, but still projective. Let $H\subset Z$ be a general hyperplane cut of $Z$ inside $J$ and $C\subset X\times X$ the preimage of $H$. By choice, $H$ avoids the image of $\Delta$ and hence the projective curve $C$ is contained in $U$.
A: The answer is no.
Assume for contradiction that $U$ is affine. Then regular functions on $U$ separate points. On the other hand a regular function on $U$ extends to a rational function on $S$ with poles at most on $\Delta$, namely to a section of $H^0({\mathcal O}_S(n\Delta))$. If $g>1$, $h^0({\mathcal O}_X(n\Delta))=1$ for every $n\ge 0$, and we have a contradiction.
If $g=1$, then $\Delta$ is a fiber of the morphism $X\times X\to X$ defined by $(x,y)\mapsto x-y$, hence $U$ is fibered in smooth elliptic curves and therefore it is not affine. 
