28
That's normal. If the object type is float you cannot cast it to double because they are not of the same type:
object o = 1.0f;
double d = (double)o; // will throw an exception
You need to convert it:
double d = Convert.ToDouble(o);