I was looking at the .NET framework TimerQueueTimer.Close(WaitHandle) function and noticed that it checks a boolean for null. Since bool is a value type, this doesn't make much sense.
if (this.m_canceled == null)
I verified with Microsoft's Reference Source (http://referencesource.microsoft.com/#mscorlib/system/threading/timer.cs#3fbf25b1429bc310#references) and it appropriately checks the bool for true/false.
if (m_canceled)
if (this.m_canceled == null)
I verified with Microsoft's Reference Source (http://referencesource.microsoft.com/#mscorlib/system/threading/timer.cs#3fbf25b1429bc310#references) and it appropriately checks the bool for true/false.
if (m_canceled)