Logging key value pairs in a List<string>

0 Comments

If you have a List<string> with entries: [0] = Parameter1.Name [1] = Parameter1.Value [2] = Parameter2.Name [3] = Parameter2.Value and want to convert this list to a string like Parameter1.Name = [Parameter1.Value] Parameter2.Name = [Parameter2.Value],

Enabling Code Coverage in Visual Studio 2010

0 Comments

  1. Open the local.testsettings which you can access from Test -> Edit Test Settings -> Local (local.testsettings)   2. Select Data and Diagnostics from the list 3. Check the enabled checkbox on the Code

How to extract a *.msi package to an other folder

0 Comments

If you want to extract an *.msi package to a specific folder, use: msiexec /a Example.msi TARGETDIR="C:\Temp\Program Files" /qn This will extract the contents of the Example.msi to a folder "C:\Temp\Program Files"

How to determine the folders used by a Microsoft Visual Studio unit test

0 Comments

You can use the directories used by a Microsoft Visual Studio unit test, by using the TestContext object. [TestMethod] public void GetUnittestFolders() { Console.WriteLine(string.Format("CurrentTestOutcome [{0}]", TestContext.CurrentTestOutcome)); Console.WriteLine(string.Format("DeploymentDirectory [{0}]", TestContext.DeploymentDirectory)); Console.WriteLine(string.Format("ResultsDirectory [{0}]", TestContext.ResultsDirectory)); Console.WriteLine(string.Format("TestDeploymentDir [{0}]", TestContext.TestDeploymentDir));

Delegates and Events in C#

0 Comments

Nice article explaining delegates and events in C#: http://www.akadia.com/services/dotnet_delegates_and_events.html