|
And so I add a new category to my blog...titled: what the? Because sometimes, you just have to ask the question...WHY?
<what the?> One of the main draws of the .NET Framework is that regardless of language preference, we can all share a common object model to access core features. So why did I just waste 5 minutes hunting down how to get the thread ID using VB.NET? Because instead of using GetHashCode() which I'm accustomed to in C#, I have to use the oh-so-convenient AppDomain object's GetCurrentThreadId() method. I mean seriously, it is not even available from the Thread object?
Granted, Thread.ThreadID might have been a nice property, to replace GetHashCode(), but what's good for the goose...oh, I get it...this: AppDomain.GetCurrentThreadId()
Is much easier to understand than: Thread.CurrentThread.GetHashCode()
That is, if you can find it... </what the?>
|