Why is : $ (C^2 )_X = \int_C c_1 (N) $? Let $C$ be an effective Cartier divisor on a complete surface $ X $. 
I'm looking for a proof of the following : 
$$ (C^2 )_X = \int_C c_1 (N) $$ 
where $ N $ is the normal bundle of $ C $ in $ X $.
If $C$ and $X$ are non-singular, and $ i $ is the inclusion of $ C $ in $ X $, then $ N = i^* T_X / T_C $, so 
$$ (C^2 )_X = \int_C c_1 ( i^* T_X ) - c_1 (T_C ) $$
Equivalently, 
$$ ( C \cdot (C+K))_X = 2 g - 2 $$
where $ K = - c_1 ( T_X ) $ is the canonical divisor class of $ X $, and $ g $ is the genus of $ C$.
In case $X$ is a non-singular surface of degree $d$ in $ \mathbb{P}^3 $,
$$ (C^2 )_X = 2g - 2 + (4 - d) \mathrm{deg} (C) $$
There's Example 3.2.14 in Fulton's book on intersection theory which briefly mentions this, but it does not give a reference. Can someone help me out with one ? 
Thanks in advance.
 A: The explanation above for the identity$$(C^2)_X = \int_C c_1(N)$$looks fine to me. They key point is indeed the equality between the normal bundle of $C$ in $X$ and the restriction to $C$ of the line bundle on $X$ corresponding to the divisor $C$. The rest just follows from the standard properties of the first Chern class of a line bundle.
It seems that a computation above boils down to the fact that $$c_1(T_C) = 2 - 2g$$for a smooth curve $C$ of genus $g$. This is a partial case of the classical Poincaré–Hopf index theorem which says that the number of zeros (counted with multiplicities and signs) of a generic vector field (with isolated zeros) on a smooth manifold $M$ is equal to the Euler characteristic of $M$. Since the Euler characteristic of a smooth compact complex curve is genus $g$ of $2 - 2g$, and a generic vector field is exactly a generic section of $T_C$ we get the desired formula.
Another way to prove that$$c_1(T_C)=2-2g$$is to exhibit it as a partial case of the Riemann-Hurwitz formula (for a holomorphic map $C\to\mathbb P^1$, which always exists). A nice exposition of this proof (and of the proof of the Riemann-Hurwitz formula itself) is contained in the book of Griffiths and Harris "Principles of Algebraic Geometry" in the beginning of Chapter 2 (the discussion of Riemann surfaces and algebraic curves). I highly recommend this book as the first textbook for intersection theory and Chern classes (Fulton's "Intersection Theory" is less accessible in my opinion). 
The main idea behind  the Riemann-Hurwitz formula is to compare $\deg K_C$ and $\deg K_{\mathbb P^1}$ (that is, $-2$) on one hand, and the Euler characteristics of $C$ and $\mathbb P^1$ on the other hand, and show that they are related in the same way. To compare them one has to look carefully at the ramification points of the map $C\to\mathbb P^1$ since outside of these points the map is topologically just a covering. This is a good exercise to try to fill out the details.
