Rational Dev

Rational Dev: The Never Ending Pursuit of Software Perfection

The creators of Rational Dev write software programs every day and decided that writing down ideas as we came across them might save us some pain and time in the future. This is a collection of ideas from reading internet articles, books, commerical experience and attempted rational thinking. Hopefully you will join us and provide your own feedback on the ideas presented here.

Posted On: July 5, 2004 - 8:08pm by Rational

Test View Not Displaying All Unit Tests in Visual Studio 2008

For a Visual Studio project to display tests in the Test View window it needs to be created as a "Test" project. If you want to see the tests and it was created as some other kind of project originally, you should be able to add the following in the element in you
.csproj file which is XML based:


<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

Now Visual Studio 2008 should display all your unit tests in the Test View window.

Thanks to this article for helping me out with this one.

Posted On: May 29, 2009 - 4:37am by Rational
( categories: )

C#: Constant String From a Constant Char

Have you ever wanted to use a char as a constant string and tried something similar to below, but can't because const string must be valid at compile time?

const string AcceptCommand = Keys.Enter.ToString();

The closest I have found on how to do this is:

private static readonly AcceptCommand = Keys.Enter.ToString();

Posted On: May 19, 2009 - 1:17pm by Rational
( categories: )

C# Snippet Compiler

Silver have a nifty C# snippet compiler. There are .NET 3.5, .NET 2.0 and .NET 1.1 versions. Handy for those times when you want to compile and test something quickly.

Posted On: May 17, 2009 - 2:56pm by Rational
( categories: )

Useful Visual Studio C# Command Key Bindings

This is a nifty poster with the Visual Studio key bindings. It is a good idea to take the time to learn these as it will save you time in the long run.

Microsoft Visual C# Default Keybindings

Posted On: April 15, 2009 - 1:56am by Rational

log4net Custom Logging Level

Do you want to extend the ILog interface to include your own custom logging level?

There is an example of how to do this in the examples that come with log4net. The example creates a Trace level. See examples\net\1.0\Extensibility\TraceLogApp.

Posted On: March 19, 2009 - 9:48am by Rational
( categories: )

Checkpoints for Software Architecture Document (SAD)

This is a great link that contains a checklist for your Checkpoints for Software Architecture Document (SAD).

Posted On: March 12, 2009 - 9:36am by Rational
( categories: )

Always Expand Menu in Office

Not having menu options always expanded drives me crazy. Here is a reminder for me and for you on how to make menus always expanded in Office.

In an Office application right click on the toolbar area and select "Customize".

Click the Options tab

Check "Always show full menus"

Click "Close"

Posted On: March 12, 2009 - 6:16am by Rational
( categories: )

Error getting clipboard data

If you are trying to Alt-Print Screen or Print Screen and then paste to an application such as Paint, you might sometimes get the message:

"Error getting clipboard data"

Chances are you have more than one monitor.

The only reliable way I found to fix this was to revert back to a single monitor.

Other ideas people had that may or may not work for you:

  • Reboot
  • Create a new user profile
  • Perform copy and paste from your main monitor
  • Close more programs.
Posted On: February 18, 2009 - 5:59am by Rational
( categories: )

C# Cloning

C# cloning is the concept of taking an existing object and then creating a new object and copying the data from the original object into the new object.

There is also the concept of a shallow and a deep clone. A shallow clone will retain references to the existing objects reference by the original object, whilst a deep clone also makes copies of referenced objects.

Here is a good article on different C# cloning techniques.

Posted On: January 8, 2009 - 4:50am by Rational
( categories: )

User login

Google

Navigation