Tim on January 27th, 2009

My new favorite macro in Visual Studio 2008 is control-D then control-K. Hit that key sequence and voila: all code on the page has been formatted. It’s especially helpful when copy-pasting. Just a tip from Tim to make your life easier!

Continue reading about Auto Format Code in Visual Studio 2008

Tim on June 3rd, 2008

The IsNullOrEmpty method was added to the String class in the 2.0 Framework, and it makes testing for an empty or null string as easy as a single function call. Instead of having to test the String object if it’s null then checking if it’s empty, this can now be done in one easy method [...]

Continue reading about Is it null, or is it empty?

Tim on March 13th, 2008

I recently completed a project at work that included the requirement to monitor data files on 30 or more different Windows NT4 machines for changes. Naturally I thought of using the FileSystemWatcher class in the System.IO namespace. As anyone who has used the FileSystemWatcher has come to realize, it can be unreliable. Specifically, if one [...]

Continue reading about Who watches the watcher?

Tim on November 12th, 2007

In the first part of my series on Generics in VB.NET I discussed the advantages of generic collections. In this installment I’ll cover the Nullable Generic Structure. First, let’s cover some background. A type is nullable if it can be assigned a value or Nothing (null in C#). For example a String object is nullable [...]

Continue reading about A Case for Generics in VB.NET – Part 2

Tim on October 27th, 2007

Dim, ReDim, ReDim Preseve, Repeat. Sound familiar? If so, maybe you want to look into generic collections. In the System.Collections namespace the ArrayList class will give you a dynamically allocated list of objects that’s easy to use. You won’t need to worry about ReDim’ing the array if you need to add items, and you won’t have [...]

Continue reading about A Case For Generics In VB.NET – Part 1