public static float ToFloat(this object anObject) { float ret = 0; try { ret = Convert.ToSingle(anObject); } catch (Exception) { } return ret; }