This code works (C# 3)
double d; if(d == (double)(int)d) ...;
If your double is the result of another calculation, you probably want something like:
d == Math.Floor(d + 0.00001);
That way, if there's been a slight rounding error, it'll still match.