It is ok to do this?
double doubleVariable=0.0; if (doubleVariable==0) { ... }
Or this code would suffer from potential rounding problem
Try:
if (double.Equals(doubleValue, 0.0)){}