Archive for the 'Tips'n'Tricks' Category

Visual Studio Macro to switch between CPP and H files

I’ve been doing a lot of managed C++ programming lately and I had forgotten what a pain it is switching back and forth between the header file and source file.  Back in the days of Visual Studio 6 I had a macro that switched between the CPP and H file, so I went googling, but [...]

The Stopwatch Class in .NET

Do you ever find yourself using DateTime to time a section of code?  Do you have code like the following?
DateTime start = DateTime.Now;

// Perform a long process
Thread.Sleep( 1968 );

DateTime end = DateTime.Now;
TimeSpan duration = end.Subtract( start );
Console.WriteLine( “This process took {0} ms”,
[...]

Quickly Find/Open a File in Visual Studio

Here is a cool Visual Studio feature that almost nobody knows about. If you want to open up a file in your solution, but can’t be bothered to dig down through your projects and folders to find it, try this,

Click in the Find box in the toolbar,
Type >of followed by a space, then begin the [...]