Blog Archives

Aside

In the phrase “It’s now or never”, never refers to an arbitrarily far in the future time that can not be reached. How far away is that? TimeSpan t = DateTime.MaxValue – DateTime.Now; var days = t.TotalDays; var years = … Continue reading

Aside

We have a SQL 2008 database which has some varchar fields used to store times. I wanted to migrate them to use actual time fields, but the format entered into the varchar field had been inconsistent (as previously, there was … Continue reading

Aside

In the official MSDN documentation for .NET DataTable, it says: Do not throw a NullReferenceException within the RowChanged event handler. If a NullReferenceException is thrown within the RowChanged event of a DataTable, then the DataTable will be corrupted. I found, … Continue reading