I am trying to assign a huge number of (milliseconds) to a timer interval, but i got this crash on "timer.Enabled = true" line !
The Exception Says :
An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
Additional information: Number must be either non-negative and less than or equal to Int32.MaxValue or -1.
This is my code:
CurrencyTimer.Interval = 2626086891.0;
CurrencyTimer.Enabled = true;
CurrencyTimer.AutoReset = true;
CurrencyTimer.Elapsed += new System.Timers.ElapsedEventHandler(TimerWorker);
CurrencyTimer.Start();
The Exception point to this line : CurrencyTimer.Enabled = true; Thanks,