Archives
-
Log4net's new TelnetAppender
The recently released 1.2.9-beta of log4net contains a new appender -- TelnetAppender. This appender acts like a telnet server and allows telnet clients to connect to it and monitor log4net's trace messages. I've only used log4net 1.2.8 but the TelnetAppender sounded pretty neat so I had to try it out. Here's a quick sample app I did. Note the DOMConfigurator has been deprecated and I'm now using the XmlConfigurator:
-
Avoiding IsNothing()
A few days ago I posted about my surprise on finding out what IsNothing() really does. After reviewing more code I found out another reason you should avoid this: It accepts value types! Obviously, since IsNothing() is a function that accepts an 'object', you can pass anything you want to it. If it's a value type, .NET will box it up into an object and pass it to IsNothing -- which will always return false on a boxed value!
-
IsNothing? Definitely!
While reviewing some existing code at my new job I noticed that they use the VB.NET IsNothing() function instead of using the "Is Nothing" syntax. I didn't even know there was an "IsNothing" function so I compiled some code and checked it out with ILDASM. Here's what I compiled: