Archive for the 'Tips’n'Tricks' Category

.NET Application Settings

Application Settings are the recommended way to save state between runs of your program. Long gone are the days of using the registry or INI files to save information. The only problem with Application Settings though is that they tend to disappear whenever you release a new version of your application. Fortunately, it is easy [...]

Visual Studio 2010 Command Prompt Here

Real developers live on the command line. Way back in 1996, Microsoft released the Command Prompt Here Power Toy to ease their pain. Industrious developers who preferred the Visual Studio command prompt took it and adopted it to run a Visual Studio command prompt with all of the paths to Visual Studio and .NET tools [...]

The dangers of Macros

Another developer came to me with a problem today that he couldn’t figure out. He couldn’t believe what he was seeing in the debugger and needed a second set of eyes. He had a line of code like the following; return max( eRetVal, GetNumber() ); While debugging, he noticed that he was stepping into the [...]

Extending CopyHelper using Extension Methods

In my last two posts, I have been developing a small utility library to do the grunt work of copying data from an instance of one class to an instance of another type. The Copier class from my last post allows me to copy all public properties from one class to another class as long [...]

Extending CopyHelper using Generics

In my last post, I created a method that does the grunt work of copying data from an instance of one class to an instance of another type. I often find myself copying data between the properties of my data layer classes and those of my user interface like this. // Copy the data from [...]