You may have a need to perform an action way off in the future based on a specific date and time. The future date could be a day, week, month, etc. The timers provided within the .NET Framework do not support this scenario; however, they do provide the core mechanism. The first step is choosing a timer. There is the System.Timers.Timer, System.Threading.Timer, and of course the System.Windows.Forms timer which is designed for Windows Forms applications. I chose the System.Threading.Timer, because ......
Does anyone have a compelling reason why System.IO.File.ReadAllText throws a System.IO.IOException when you call it when the file is being written to? Obviously, the cause of the exception is that internally it allows only Read sharing. But, why?
It's not a terribly big issue, because creating the System.IO.FileStream and passing that to the System.IO.StreamReader is trivial. However, that doesn't quell my curiousity. Is it an implementation bug, or was it intentional?