public static float ToFloat(object obj) { float result = 0.0f; float.TryParse(obj.ToString(), out result); return result; }