Geeks With Blogs


View Anthony Trudeau's profile on LinkedIn

Add to Technorati Favorites

Anthony Trudeau January 2010 Entries
Calendar-based Timer
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 ......

Posted On Thursday, January 28, 2010 10:55 AM

System.IO.File.ReadAllText Doesn't Allow Shared Writing

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?

Posted On Monday, January 4, 2010 1:34 PM

Copyright © Anthony Trudeau | Powered by: