您的位置:首页 > 其它

timer的interval值最大到底是多少

2012-04-22 20:02 183 查看
反编.net framwork  我们可以得到

[DefaultValue(100), SRCategory("CatBehavior"), SRDescription("TimerIntervalDescr")]
public int Interval
{
get
{
return this.interval;
}
set
{
lock (this.syncObj)
{
if (value < 1)
{
object[] args = new object[] { value, 0.ToString(CultureInfo.CurrentCulture) };
throw new ArgumentOutOfRangeException("Interval", SR.GetString("TimerInvalidInterval", args));
}
if (this.interval != value)
{
this.interval = value;
if ((this.Enabled && !base.DesignMode) && (this.timerWindow != null))
{
this.timerWindow.RestartTimer(value);
}
}
}
}
}
说明这是个int32 
而且呢  小于1的时候会报错哦


继续察看int32

[Serializable, StructLayout(LayoutKind.Sequential), ComVisible(true)]
public struct Int32 : IComparable, IFormattable, IConvertible, IComparable<int>, IEquatable<int>
{
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: