public static Int64 UnboxInt64(object value) { if (value is Int64) return (Int64)value; if (value is IConvertible) return CheckNumericPromotion(value).ToInt64(null); return (Int64)value; }