How to iterate a C# dictionary

The following snippet shows an easy way to iterate a C# dictionary:

</p><br />
<p>            Dictionary<int, string> dictionary = new Dictionary<int, string>();</p><br />
<p>   <a href="" title="literature <a hreflang="en" href="" id="hivdrn">julietta casino online</a> review writing">literature review writing</a>          dictionary.Add(1, "Cat");<br /><br />
       <a id="hkcybd" href="" hreflang="en">canadian roulette</a>      dictionary.Add(2, "Dog");<br /><br />
            dictionary.Add(3, "Horse");</p><br />
<p>            foreach (var item in dictionary)<br /><br />
            {<br /><br />
                // do stuff with item<br /><br />
                Console.WriteLine(string.Format("{0} - {1}", item.Key, item.Value));<br /><br />
            }</p><br />
<p>    <a href="" hreflang="en" id="yxdwfj">canadian online casinos</a>         // Result:<br /><br />
            // 1 - Cat<br /><br />
            // 2 - Dog<br /><br />
            // 3 - Horse</p><br />

Tagged , , | Comments Off on How to iterate a C# dictionary

Mercurial and Redmine on Bluehost

Here is how I installed Mercurial and Redmine on bluehost
It is a script/screenshot walktrough on buy cialis 10mg the entire setup.

Posted in bluehost | Tagged , , | Comments Off on Mercurial and Redmine on Bluehost

How to export your SQL Server table – the easy way

Since I work as a consultant I always bring with me my “toolbox”. My latest addition to this toolbox is a SQL Server script created by Narayana Vyas Kondreddi

He has created a script that let you export your data, by generating a insert script, from a given table in a very easy way.

All you need to do to make is work is:

  • Download the script and add the procedure called sp_generate_inserts
  • Generate your insert script by calling: EXEC sp_generate_inserts ‘myTable’

The insert script will now be written to the output in query analyzer.

Please note that by default the query analyzer will only display the first 256 charachters from each line.
You can change this setting from: Tools->Options->Query Result->SQL Server->Result to Text.

Maximum allowed value is 8192.

You can download the script here:

For more information on how to use the script and all the features check out this page:

Posted in SQL Server | Tagged , , | Comments Off on How to export your SQL Server table – the easy way