以下代码中的 long 数据类型有什么问题,它返回 -666167296,time=42 和 TimeStyle.Days?
private long ConvertToMilliSeconds(int time, TimeStyle style)
{
long t = 0;
switch (style)
{
case TimeStyle.Millisecons:
t = time;
break;
case TimeStyle.Seconds:
t = time * 1000;
break;
case TimeStyle.Minutes:
t = time * 1000 * 60;
break;
case TimeStyle.Hours:
t = time * 1000 * 60 * 60;
break;
case TimeStyle.Days:
t = time * 86400000;
break;
default:
break;
}
return t;
}