Never trust GetEntryAssembly

One quick tip-

I was using Assembly.GetEntryAssembly().FullName in my logging infrastructure to get the name of the application assembly. It turns out that the call throws an exception when called in any appdomain other than the default - GetEntyAssembly returns null, and the .Fullname causes the exception. A better solution: Process.GetCurrentProcess().ProcessName. As an added bonus, the GetCurrentProcess also provides a list of loaded modules, each with oodles of properties.