public int GetResult(Object op, int order)
{
Int64 valA = Convert.ToInt64(op.BaoKaoOrderStart) * (op.TsOrderEnd - order);
Int64 valB = Convert.ToInt64(op.BaoKaoOrderEnd) * (order - op.TsOrderStart);
int result = (int)((valA + valB) / (op.TsOrderEnd - op.TsOrderStart));
return result;
}
使用 Convert.ToInt64(数值) 来解决!