<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1009430530424913741</id><updated>2026-06-02T20:23:40.619+01:00</updated><category term="c#"/><category term=".net"/><category term="sql"/><category term="sqlserver"/><category term="windows"/><category term="wpf"/><category term="web"/><category term="linq"/><category term="scala"/><category term="gui"/><category term="winforms"/><category term="asp.net"/><category term="excel"/><category term="parallel programming"/><category term="functional programming"/><category term="linux"/><category term="log4net"/><category term="mvc3"/><category term="mvc4"/><category term="authentication"/><category term="git"/><category term="hg"/><category term="java"/><category term="json"/><category term="mercurial"/><category term="xml"/><category term="dvcs"/><category term="graphics"/><category term="gwt"/><category term="play"/><category term="regex"/><category term="roslyn"/><category term="scripting"/><category term="spring"/><category term="vba"/><category term="T4"/><category term="active directory"/><category term="addin"/><category term="ajax"/><category term="autosys"/><category term="bcp"/><category term="bloomberg"/><category term="bunzip"/><category term="charts"/><category term="css"/><category term="csv"/><category term="debugger"/><category term="delegation"/><category term="dynamic"/><category term="fiddler"/><category term="html"/><category term="iis"/><category term="interactive"/><category term="kerberos"/><category term="lift"/><category term="mef"/><category term="mobile"/><category term="multithreading"/><category term="mvc"/><category term="node"/><category term="nuget"/><category term="nunit"/><category term="p2p"/><category term="pivot"/><category term="powertoys"/><category term="python"/><category term="razor"/><category term="restful"/><category term="sbt"/><category term="serialization"/><category term="service"/><category term="sqlite"/><category term="subversion"/><category term="svn"/><category term="tar"/><category term="teamcity"/><category term="tibco"/><category term="tibrv"/><category term="vi"/><category term="wcf"/><category term="xsd"/><title type='text'>ITDevSpace - Development Tips &amp;amp; Tricks</title><subtitle type='html'>Solutions to common programming problems in Java, C#, .Net, Python, SQL, Excel/VBA and other languages.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.itdevspace.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default?start-index=26&amp;max-results=25'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>282</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-6497283753350646142</id><published>2018-02-16T21:38:00.000+00:00</published><updated>2018-02-16T21:38:26.314+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="teamcity"/><title type='text'>Multiple TeamCity Build Agents on one Server</title><content type='html'>&lt;a href=&quot;https://handcraftsman.wordpress.com/2010/07/20/multiple-teamcity-build-agents-on-one-server/&quot;&gt;multiple-teamcity-build-agents-on-one-server&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/6497283753350646142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2018/02/multiple-teamcity-build-agents-on-one.html#comment-form' title='180 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/6497283753350646142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/6497283753350646142'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2018/02/multiple-teamcity-build-agents-on-one.html' title='Multiple TeamCity Build Agents on one Server'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>180</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-2143347412882210731</id><published>2016-01-03T13:34:00.001+00:00</published><updated>2019-10-24T13:35:06.662+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="excel"/><title type='text'>How to recalculate Excel named range when another named range changes</title><content type='html'>&lt;script src=&quot;https://gist.github.com/madamowski/8432766.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/2143347412882210731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2016/01/how-to-recalculate-excel-named-range.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/2143347412882210731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/2143347412882210731'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2016/01/how-to-recalculate-excel-named-range.html' title='How to recalculate Excel named range when another named range changes'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-8982231456488857438</id><published>2015-03-14T16:45:00.001+00:00</published><updated>2015-03-14T16:45:36.917+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sbt"/><category scheme="http://www.blogger.com/atom/ns#" term="scala"/><title type='text'>Sbt template to setup scala multi-project build with dependencies</title><content type='html'>&lt;a href=&quot;https://github.com/madamowski/sbt-multiproject-template&quot; target=&quot;_blank&quot;&gt;GitHub project &#39;sbt-multiproject-template&#39;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/8982231456488857438/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2015/03/sbt-template-to-setup-scala-multi.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/8982231456488857438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/8982231456488857438'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2015/03/sbt-template-to-setup-scala-multi.html' title='Sbt template to setup scala multi-project build with dependencies'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-2290827278609487994</id><published>2014-11-18T08:47:00.000+00:00</published><updated>2014-11-18T08:47:09.452+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sql"/><category scheme="http://www.blogger.com/atom/ns#" term="sqlserver"/><title type='text'>SQL Server User-Defined Table Type</title><content type='html'>&lt;script src=&quot;https://gist.github.com/madamowski/a15cc8b943082945d3f7.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/2290827278609487994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2014/11/sql-server-user-defined-table-type.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/2290827278609487994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/2290827278609487994'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2014/11/sql-server-user-defined-table-type.html' title='SQL Server User-Defined Table Type'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-4410046898100368545</id><published>2014-10-21T14:31:00.001+01:00</published><updated>2014-10-21T14:33:03.592+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="scala"/><title type='text'>Scala Option Type</title><content type='html'>&lt;a href=&quot;http://danielwestheide.com/blog/2012/12/19/the-neophytes-guide-to-scala-part-5-the-option-type.html&quot; target=&quot;_blank&quot;&gt;The Neophyte&#39;s Guide to Scala Part 5: The Option Type by Daniel Westheide&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/4410046898100368545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2014/10/scala-option-type.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/4410046898100368545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/4410046898100368545'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2014/10/scala-option-type.html' title='Scala Option Type'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-4657653672930033044</id><published>2014-10-09T12:57:00.000+01:00</published><updated>2014-10-09T12:57:15.112+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sql"/><category scheme="http://www.blogger.com/atom/ns#" term="sqlserver"/><title type='text'>SQL Server Isolation Levels By Example</title><content type='html'>&lt;a href=&quot;http://gavindraper.com/2012/02/18/sql-server-isolation-levels-by-example/&quot; target=&quot;_blank&quot;&gt;SQL Server Isolation Levels By Example&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/4657653672930033044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2014/10/sql-server-isolation-levels-by-example.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/4657653672930033044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/4657653672930033044'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2014/10/sql-server-isolation-levels-by-example.html' title='SQL Server Isolation Levels By Example'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-3965703884690648300</id><published>2014-10-08T09:15:00.001+01:00</published><updated>2014-10-08T09:15:34.202+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sql"/><category scheme="http://www.blogger.com/atom/ns#" term="sqlserver"/><title type='text'>SQL Server refresh all views &amp; stored procedures</title><content type='html'>&lt;script src=&quot;https://gist.github.com/madamowski/c48598e1ff04cec2bed6.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/3965703884690648300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2014/10/sql-server-refresh-all-views-stored.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/3965703884690648300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/3965703884690648300'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2014/10/sql-server-refresh-all-views-stored.html' title='SQL Server refresh all views &amp; stored procedures'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-8218658721464939678</id><published>2014-03-06T17:08:00.001+00:00</published><updated>2014-03-06T17:08:45.500+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="json"/><category scheme="http://www.blogger.com/atom/ns#" term="play"/><category scheme="http://www.blogger.com/atom/ns#" term="scala"/><title type='text'>Scala Play Framework json case class example</title><content type='html'>&lt;script src=&quot;https://gist.github.com/madamowski/9394289.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/8218658721464939678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2014/03/scala-play-framework-json-case-class.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/8218658721464939678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/8218658721464939678'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2014/03/scala-play-framework-json-case-class.html' title='Scala Play Framework json case class example'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-3627249119605112250</id><published>2014-01-15T13:40:00.000+00:00</published><updated>2019-10-24T13:40:54.066+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="node"/><category scheme="http://www.blogger.com/atom/ns#" term="web"/><title type='text'>The simplest Node (with Connect) html server</title><content type='html'>&lt;script src=&quot;https://gist.github.com/madamowski/8433007.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/3627249119605112250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2014/01/the-simplest-node-with-connect-html.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/3627249119605112250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/3627249119605112250'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2014/01/the-simplest-node-with-connect-html.html' title='The simplest Node (with Connect) html server'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-9152940608800425091</id><published>2013-10-30T10:40:00.001+00:00</published><updated>2013-10-30T10:45:27.795+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="authentication"/><category scheme="http://www.blogger.com/atom/ns#" term="delegation"/><category scheme="http://www.blogger.com/atom/ns#" term="iis"/><category scheme="http://www.blogger.com/atom/ns#" term="kerberos"/><category scheme="http://www.blogger.com/atom/ns#" term="mvc"/><title type='text'>How to enable Kerberos Delegation in Google Chrome</title><content type='html'>&lt;p&gt;&lt;strong&gt;&lt;u&gt;* Using Registry Key&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Set/Add this string registry key&lt;/p&gt;  &lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome]
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;Name: AuthNegotiateDelegateWhitelist
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;Value: *&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;* Using Command Line param&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;--auth-negotiate-delegate-whitelist=*&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;Delegation can be restricted to servers in the specific domain&lt;/p&gt;

&lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;*.mydomain.com&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;I’ve tested it with IIS + SQL Server and double hop delegation works fine. &lt;/p&gt;

&lt;p&gt;You can read more about &lt;a href=&quot;http://www.chromium.org/developers/design-documents/http-authentication&quot; target=&quot;_blank&quot;&gt;Google Chrome command line params here&lt;/a&gt;.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/9152940608800425091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2013/10/how-to-enable-kerberos-delegation-in.html#comment-form' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/9152940608800425091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/9152940608800425091'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2013/10/how-to-enable-kerberos-delegation-in.html' title='How to enable Kerberos Delegation in Google Chrome'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-3598045058850016367</id><published>2013-10-22T13:40:00.001+01:00</published><updated>2013-10-22T13:40:03.502+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".net"/><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="debugger"/><title type='text'>Remote debugging IIS Web Application from Visual Studio</title><content type='html'>&lt;p&gt;Setup your debug environment as described in &lt;a href=&quot;http://www.itdevspace.com/2013/05/remote-debugging-from-visual-studio.html&quot;&gt;Remote debugging from Visual Studio&lt;/a&gt; post.&lt;/p&gt;  &lt;p&gt;When you click &lt;strong&gt;‘Attach’&lt;/strong&gt; select w3wp.exe process. If you’re running Application Pools with multiple version of .Net you might see more than one process so make sure you select the correct one.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/3598045058850016367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2013/10/remote-debugging-iis-web-application.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/3598045058850016367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/3598045058850016367'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2013/10/remote-debugging-iis-web-application.html' title='Remote debugging IIS Web Application from Visual Studio'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-1801967676672570401</id><published>2013-10-22T12:30:00.001+01:00</published><updated>2013-10-30T10:46:26.491+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".net"/><category scheme="http://www.blogger.com/atom/ns#" term="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="authentication"/><category scheme="http://www.blogger.com/atom/ns#" term="mvc4"/><category scheme="http://www.blogger.com/atom/ns#" term="web"/><title type='text'>DelegConfig Kerberos Delegation Configuration Reporting Tool by Brian Murphy-Booth</title><content type='html'>&lt;h4&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;&lt;a href=&quot;http://blogs.iis.net/brian-murphy-booth/archive/2007/03/09/delegconfig-delegation-configuration-reporting-tool.aspx&quot; target=&quot;_blank&quot;&gt;DelegConfig&lt;/a&gt; is an &lt;/font&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;ASP.Net application to test Kerberos/Delegation configuration on your IIS &amp;amp; SQL Server. Useful for testing double hop authentication issues.&lt;/font&gt;&lt;/h4&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/1801967676672570401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2013/10/delegconfig-kerberosdelegation.html#comment-form' title='19 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/1801967676672570401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/1801967676672570401'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2013/10/delegconfig-kerberosdelegation.html' title='DelegConfig Kerberos Delegation Configuration Reporting Tool by Brian Murphy-Booth'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>19</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-8363435850719354781</id><published>2013-10-22T12:19:00.001+01:00</published><updated>2013-10-22T12:22:10.453+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="authentication"/><category scheme="http://www.blogger.com/atom/ns#" term="mvc4"/><category scheme="http://www.blogger.com/atom/ns#" term="parallel programming"/><category scheme="http://www.blogger.com/atom/ns#" term="web"/><title type='text'>IIS Windows Authentication/Delegation issue with C# Parallel Tasks</title><content type='html'>&lt;p&gt;When you use double-hop authentication (WebBrowser-&amp;gt;IIS-&amp;gt;SQL Server) code executed on the webserver inside Parallel.Invoke() or Task.Factory.StartNew() is no longer executed as authenticated user (domain\username) but is being changed to (domain\iisservername$). You can see it in Environment.UserName when debuging. So if you&#39;re executing any SQL queries as Tasks you might get permission denied errors.&lt;/p&gt;  &lt;p&gt;The way to fix it is to pass custom TaskScheduler from CurrentSynchronizationContext&lt;/p&gt;  &lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;Parallel.Invoke(
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; ParallelOptions()
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    TaskScheduler = TaskScheduler.FromCurrentSynchronizationContext()
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  },
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  () =&amp;gt; { &lt;span style=&quot;color: #008000&quot;&gt;/*do something here;*/&lt;/span&gt; },
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;Task.Factory.StartNew(
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  () =&amp;gt; { &lt;span style=&quot;color: #008000&quot;&gt;/*do something here;*/&lt;/span&gt; }, 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  CancellationToken.None, 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  TaskCreationOptions.None,
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  TaskScheduler.FromCurrentSynchronizationContext()
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;);&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;This is a good article about SynchronizationContext &lt;a href=&quot;http://msdn.microsoft.com/en-us/magazine/gg598924.aspx&quot; target=&quot;_blank&quot;&gt;It&#39;s All About the SynchronizationContext&lt;/a&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/8363435850719354781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2013/10/iis-windows-authenticationdelegation.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/8363435850719354781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/8363435850719354781'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2013/10/iis-windows-authenticationdelegation.html' title='IIS Windows Authentication/Delegation issue with C# Parallel Tasks'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-4563709152423633743</id><published>2013-10-17T15:16:00.001+01:00</published><updated>2013-10-17T15:16:48.022+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sql"/><title type='text'>SQL Copy data in batches</title><content type='html'>&lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #008000&quot;&gt;-- SOURCE TABLE&lt;/span&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=DECLARE&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;DECLARE&lt;/a&gt; @&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=Table&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;Table&lt;/a&gt;1 &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=TABLE&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;TABLE&lt;/a&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;(
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  AsOf &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=DATETIME&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;DATETIME&lt;/a&gt;,
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  Company &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=VARCHAR&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;VARCHAR&lt;/a&gt;(50),
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  Name &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=VARCHAR&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;VARCHAR&lt;/a&gt;(50)
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;)
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=INSERT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;INSERT&lt;/a&gt; &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=INTO&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;INTO&lt;/a&gt; @&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=Table&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;Table&lt;/a&gt;1
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=SELECT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;SELECT&lt;/a&gt; &#39;&lt;span style=&quot;color: #8b0000&quot;&gt;20130101&lt;/span&gt;&#39;,&#39;&lt;span style=&quot;color: #8b0000&quot;&gt;Company1&lt;/span&gt;&#39;,&#39;&lt;span style=&quot;color: #8b0000&quot;&gt;John&lt;/span&gt;&#39;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=UNION&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;UNION&lt;/a&gt; &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=SELECT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;SELECT&lt;/a&gt; &#39;&lt;span style=&quot;color: #8b0000&quot;&gt;20130102&lt;/span&gt;&#39;,&#39;&lt;span style=&quot;color: #8b0000&quot;&gt;Company2&lt;/span&gt;&#39;,&#39;&lt;span style=&quot;color: #8b0000&quot;&gt;Tom&lt;/span&gt;&#39;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=UNION&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;UNION&lt;/a&gt; &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=SELECT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;SELECT&lt;/a&gt; &#39;&lt;span style=&quot;color: #8b0000&quot;&gt;20130101&lt;/span&gt;&#39;,&#39;&lt;span style=&quot;color: #8b0000&quot;&gt;Company3&lt;/span&gt;&#39;,&#39;&lt;span style=&quot;color: #8b0000&quot;&gt;Peter&lt;/span&gt;&#39;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=UNION&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;UNION&lt;/a&gt; &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=SELECT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;SELECT&lt;/a&gt; &#39;&lt;span style=&quot;color: #8b0000&quot;&gt;20130102&lt;/span&gt;&#39;,&#39;&lt;span style=&quot;color: #8b0000&quot;&gt;Company4&lt;/span&gt;&#39;,&#39;&lt;span style=&quot;color: #8b0000&quot;&gt;Ian&lt;/span&gt;&#39;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #008000&quot;&gt;-- DESTINATION TABLE&lt;/span&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=DECLARE&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;DECLARE&lt;/a&gt; @&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=Table&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;Table&lt;/a&gt;2 &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=TABLE&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;TABLE&lt;/a&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;(
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  AsOf &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=DATETIME&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;DATETIME&lt;/a&gt;,
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  Company &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=VARCHAR&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;VARCHAR&lt;/a&gt;(50),
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  Name &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=VARCHAR&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;VARCHAR&lt;/a&gt;(50)
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;)
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #008000&quot;&gt;-- BATCH TABLE&lt;/span&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=DECLARE&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;DECLARE&lt;/a&gt; @Batches &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=TABLE&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;TABLE&lt;/a&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;(
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  AsOf &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=DATETIME&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;DATETIME&lt;/a&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;)
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=INSERT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;INSERT&lt;/a&gt; &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=INTO&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;INTO&lt;/a&gt; @Batches
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=SELECT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;SELECT&lt;/a&gt; &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=DISTINCT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;DISTINCT&lt;/a&gt; AsOf &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=FROM&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;FROM&lt;/a&gt; @&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=Table&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;Table&lt;/a&gt;1
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #008000&quot;&gt;-- COPY IN BATCHES&lt;/span&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=DECLARE&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;DECLARE&lt;/a&gt; @AsOf &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=DATETIME&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;DATETIME&lt;/a&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=WHILE&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;WHILE&lt;/a&gt; (&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=Exists&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;Exists&lt;/a&gt;(&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=SELECT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;SELECT&lt;/a&gt; 1 &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=FROM&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;FROM&lt;/a&gt; @Batches))
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=BEGIN&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;BEGIN&lt;/a&gt; TRY  
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=BEGIN&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;BEGIN&lt;/a&gt; &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=TRAN&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;TRAN&lt;/a&gt;   
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=SELECT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;SELECT&lt;/a&gt; @AsOf = &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=MIN&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;MIN&lt;/a&gt;(AsOf) &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=FROM&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;FROM&lt;/a&gt; @Batches
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=PRINT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;PRINT&lt;/a&gt; &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=CONVERT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;CONVERT&lt;/a&gt;(&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=VARCHAR&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;VARCHAR&lt;/a&gt;(20),GETDATE(),20) + &#39;&lt;span style=&quot;color: #8b0000&quot;&gt;,&lt;/span&gt;&#39; + &#39;&lt;span style=&quot;color: #8b0000&quot;&gt;Copying data for: &lt;/span&gt;&#39;+&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=convert&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;convert&lt;/a&gt;(&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=VARCHAR&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;VARCHAR&lt;/a&gt;(8),@AsOf,112)
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=INSERT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;INSERT&lt;/a&gt; &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=INTO&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;INTO&lt;/a&gt; @&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=Table&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;Table&lt;/a&gt;2 (
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      AsOf,
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      Company,
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      Name
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    )
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=SELECT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;SELECT&lt;/a&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      AsOf,
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      Company,
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      Name
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=FROM&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;FROM&lt;/a&gt; @&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=Table&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;Table&lt;/a&gt;1
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=WHERE&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;WHERE&lt;/a&gt; AsOf = @AsOf
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=DELETE&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;DELETE&lt;/a&gt; &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=FROM&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;FROM&lt;/a&gt; @Batches &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=WHERE&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;WHERE&lt;/a&gt; AsOf = @AsOf
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=COMMIT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;COMMIT&lt;/a&gt; &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=TRAN&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;TRAN&lt;/a&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=END&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;END&lt;/a&gt; TRY
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=BEGIN&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;BEGIN&lt;/a&gt; CATCH 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=ROLLBACK&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;ROLLBACK&lt;/a&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=END&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;END&lt;/a&gt; CATCH
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #008000&quot;&gt;-- SHOW RESULTS&lt;/span&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=SELECT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;SELECT&lt;/a&gt; * &lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=FROM&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;FROM&lt;/a&gt; @&lt;a style=&quot;color: #0000ff&quot; href=&quot;http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=Table&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99&quot;&gt;Table&lt;/a&gt;2&lt;/pre&gt;&lt;/pre&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/4563709152423633743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2013/10/sql-copy-data-in-batches.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/4563709152423633743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/4563709152423633743'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2013/10/sql-copy-data-in-batches.html' title='SQL Copy data in batches'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-2412817040980207169</id><published>2013-10-14T14:30:00.001+01:00</published><updated>2013-10-14T14:33:38.530+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><title type='text'>C# Convert double to decimal</title><content type='html'>&lt;p&gt;This is a workaround to Convert.ToDecimal(Double) limitation of 15 significant digits by using &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx#RFormatString&quot; target=&quot;_blank&quot;&gt;‘R’ Round-trip Format Specifier&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/a69w9ca0.aspx#Remarks&quot; target=&quot;_blank&quot;&gt;Convert.ToDecimal Method (Double)&lt;/a&gt;      &lt;br /&gt;“The &lt;/em&gt;&lt;em&gt;Decimal&lt;/em&gt;&lt;em&gt; value returned by this method contains a maximum of 15 significant digits. If the value parameter contains more than 15 significant digits, it is rounded using rounding to nearest. The following example illustrates how the Convert.ToDecimal(Double) method uses rounding to nearest to return a &lt;/em&gt;&lt;em&gt;Decimal&lt;/em&gt;&lt;em&gt; value with 15 significant digits.”&lt;/em&gt;&lt;/p&gt;  &lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;decimal&lt;/span&gt;.Parse(dbl.ToString(&amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;R&lt;/span&gt;&amp;quot;))&lt;/pre&gt;&lt;/pre&gt;

&lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;[Test]
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; ConvertDoubleToDecimal()
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;{
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  Compare(1.00000000000006d,  1.00000000000006M);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  Compare(1.00000000000004d,  1.00000000000004M);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  Compare(1.000000000000066d, 1.000000000000066M);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  Compare(1.000000000000044d, 1.000000000000044M);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;}
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Compare(&lt;span style=&quot;color: #0000ff&quot;&gt;double&lt;/span&gt; dbl, &lt;span style=&quot;color: #0000ff&quot;&gt;decimal&lt;/span&gt; dec)
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;{
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  Convert.ToDecimal(&amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;0.d0d.&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  var d1 = Convert.ToDecimal(dbl);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  var d2 = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Decimal(dbl);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  var d3 = &lt;span style=&quot;color: #0000ff&quot;&gt;decimal&lt;/span&gt;.Parse(dbl.ToString(&amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;R&lt;/span&gt;&amp;quot;));
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  Console.WriteLine(@&amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;DOUBLE : {0:R}
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;CONVERT: {1} {2}
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;NEW  : {3} {4}
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&#39;R&#39;  : {5} {6}&lt;/span&gt;&amp;quot;, 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      dbl, 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      d1, d1.Equals(dec) ? &amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;OK&lt;/span&gt;&amp;quot; : &amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;FAILED&lt;/span&gt;&amp;quot;,
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      d2, d2.Equals(dec) ? &amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;OK&lt;/span&gt;&amp;quot; : &amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;FAILED&lt;/span&gt;&amp;quot;, 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      d3, d3.Equals(dec) ? &amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;OK&lt;/span&gt;&amp;quot; : &amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;FAILED&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;}&lt;/pre&gt;&lt;/pre&gt;

&lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;DOUBLE : 1.00000000000006
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;CONVERT: 1.00000000000006 OK
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;NEW    : 1.00000000000006 OK
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&#39;R&#39;    : 1.00000000000006 OK
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;DOUBLE : 1.00000000000004
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;CONVERT: 1.00000000000004 OK
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;NEW    : 1.00000000000004 OK
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&#39;R&#39;    : 1.00000000000004 OK
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;DOUBLE : 1.000000000000066
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;CONVERT: 1.00000000000007 FAILED
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;NEW    : 1.00000000000007 FAILED
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&#39;R&#39;    : 1.000000000000066 OK
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;DOUBLE : 1.000000000000044
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;CONVERT: 1.00000000000004 FAILED
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;NEW    : 1.00000000000004 FAILED
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&#39;R&#39;    : 1.000000000000044 OK&lt;/pre&gt;&lt;/pre&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/2412817040980207169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2013/10/c-convert-double-to-decimal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/2412817040980207169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/2412817040980207169'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2013/10/c-convert-double-to-decimal.html' title='C# Convert double to decimal'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-4634385988407603639</id><published>2013-09-13T09:42:00.001+01:00</published><updated>2013-09-13T09:42:57.711+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".net"/><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><title type='text'>IComparable&amp;lt;&amp;gt; inheritance in SortedDictionary</title><content type='html'>&lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;[Test]
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Test()
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;{
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  var dic = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; SortedDictionary&amp;lt;BaseClass, &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;&amp;gt;();
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  dic.Add(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; BaseClass(){Number = 1}, &amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  dic.Add(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; ExtendClass(){Text = &amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;One&lt;/span&gt;&amp;quot;}, &amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  Assert.True(dic.ContainsKey(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; BaseClass() { Number = 1 }));
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  Assert.False(dic.ContainsKey(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; BaseClass() { Number = 2 }));
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  Assert.True(dic.ContainsKey(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; ExtendClass() { Text = &amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;One&lt;/span&gt;&amp;quot; }));
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  Assert.False(dic.ContainsKey(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; ExtendClass() { Text = &amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;Two&lt;/span&gt;&amp;quot; }));
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;}
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; BaseClass : IComparable&amp;lt;BaseClass&amp;gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;{
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; Number { &lt;span style=&quot;color: #0000ff&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff&quot;&gt;set&lt;/span&gt;; }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;virtual&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; CompareTo(BaseClass other)
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  {        
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; Number.CompareTo(other.Number);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;}
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; ExtendClass : BaseClass, IComparable&amp;lt;ExtendClass&amp;gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;{
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; Text { &lt;span style=&quot;color: #0000ff&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff&quot;&gt;set&lt;/span&gt;; }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; CompareTo(BaseClass other)
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    var other2 = other &lt;span style=&quot;color: #0000ff&quot;&gt;as&lt;/span&gt; ExtendClass;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; other2 == &lt;span style=&quot;color: #0000ff&quot;&gt;null&lt;/span&gt; ? &lt;span style=&quot;color: #0000ff&quot;&gt;base&lt;/span&gt;.CompareTo(other) : CompareTo(other2);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; CompareTo(ExtendClass other)
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  {        
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; Text.CompareTo(other.Text);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;}&lt;/pre&gt;&lt;/pre&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/4634385988407603639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2013/09/icomparable-inheritance-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/4634385988407603639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/4634385988407603639'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2013/09/icomparable-inheritance-in.html' title='IComparable&amp;lt;&amp;gt; inheritance in SortedDictionary'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-372958932420898519</id><published>2013-09-10T12:26:00.001+01:00</published><updated>2013-09-10T12:26:57.651+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".net"/><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="multithreading"/><category scheme="http://www.blogger.com/atom/ns#" term="parallel programming"/><title type='text'>Exception handling in multithreaded C#</title><content type='html'>&lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;try&lt;/span&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;{
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  Parallel.Invoke(
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    () =&amp;gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      Console.WriteLine(&amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;Starting Job 1..&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      Thread.Sleep(3*1000);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      Console.WriteLine(&amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;Starting Job 1.. SUCCESS&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    },
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    () =&amp;gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      Console.WriteLine(&amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;Starting Job 2..&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      &lt;span style=&quot;color: #0000ff&quot;&gt;throw&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Exception(&amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;Job 2 Failed&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  );
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;}
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;catch&lt;/span&gt; (AggregateException ex)
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;{
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  Console.WriteLine(ex);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (var innerEx &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; ex.InnerExceptions)
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    Console.WriteLine(innerEx);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  }        
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;}&lt;/pre&gt;&lt;/pre&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/372958932420898519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2013/09/exception-handling-in-multithreaded-c.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/372958932420898519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/372958932420898519'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2013/09/exception-handling-in-multithreaded-c.html' title='Exception handling in multithreaded C#'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-1393581054051275104</id><published>2013-09-10T12:18:00.001+01:00</published><updated>2013-09-10T12:19:07.192+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="service"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>How to find PID of Windows Service</title><content type='html'>&lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;sc queryex &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;servicename&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/1393581054051275104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2013/09/how-to-find-pid-of-windows-service.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/1393581054051275104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/1393581054051275104'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2013/09/how-to-find-pid-of-windows-service.html' title='How to find PID of Windows Service'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-9119910240174683263</id><published>2013-05-31T12:44:00.001+01:00</published><updated>2013-05-31T12:44:03.958+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".net"/><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><title type='text'>C# Convert List IEnumerable&amp;lt;T&amp;gt; to 2D multi-dimensional array</title><content type='html'>&lt;pre&gt;&lt;pre&gt;&lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #008000&quot;&gt;//extension method&lt;/span&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;object&lt;/span&gt;[,] To2DArray&amp;lt;T&amp;gt;(&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt; IEnumerable&amp;lt;T&amp;gt; lines, &lt;span style=&quot;color: #0000ff&quot;&gt;params&lt;/span&gt; Func&amp;lt;T, &lt;span style=&quot;color: #0000ff&quot;&gt;object&lt;/span&gt;&amp;gt;[] lambdas)
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;{
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  var array = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;object&lt;/span&gt;[lines.Count(), lambdas.Count()];
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  var lineCounter = 0;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  lines.ForEach(line =&amp;gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;for&lt;/span&gt; (var i = 0; i &amp;lt; lambdas.Length; i++)
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      array[lineCounter, i] = lambdas[i](line);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    lineCounter++;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  });
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; array;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;}
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;[Test]
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Test()
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;{
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  var lines = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; List&amp;lt;Line&amp;gt;();
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  lines.Add(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Line() { Id=1, Name=&amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;One&lt;/span&gt;&amp;quot;, Age=25 });
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  lines.Add(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Line() { Id = 2, Name = &amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;Two&lt;/span&gt;&amp;quot;, Age = 35 });
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  lines.Add(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Line() { Id = 3, Name = &amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;Three&lt;/span&gt;&amp;quot;, Age = 45 });
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #008000&quot;&gt;//Convert to 2d array&lt;/span&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #008000&quot;&gt;//[1,One,25]&lt;/span&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #008000&quot;&gt;//[2,Two,35]&lt;/span&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #008000&quot;&gt;//[3,Three,45]&lt;/span&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  var range = lines.To2DArray(x =&amp;gt; x.Id, x =&amp;gt; x.Name, x=&amp;gt; x.Age);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #008000&quot;&gt;//test the result&lt;/span&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #0000ff&quot;&gt;for&lt;/span&gt;(var i=0;i&amp;lt;lines.Count;i++)
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;for&lt;/span&gt;(var j=0;j&amp;lt;3;j++)&lt;span style=&quot;color: #008000&quot;&gt;//3 lambdas passed to function&lt;/span&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      Console.Write(range[i,j]+&amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;,&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    Console.WriteLine();
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;}
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; Line
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;{
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; Id { &lt;span style=&quot;color: #0000ff&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff&quot;&gt;set&lt;/span&gt;; }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; Name { &lt;span style=&quot;color: #0000ff&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff&quot;&gt;set&lt;/span&gt;; }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; Age { &lt;span style=&quot;color: #0000ff&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff&quot;&gt;set&lt;/span&gt;; }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;}&lt;/pre&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;/pre&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/9119910240174683263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2013/05/c-convert-list-ienumerable-to-2d-multi.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/9119910240174683263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/9119910240174683263'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2013/05/c-convert-list-ienumerable-to-2d-multi.html' title='C# Convert List IEnumerable&amp;lt;T&amp;gt; to 2D multi-dimensional array'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-4313998049159000176</id><published>2013-05-09T18:02:00.001+01:00</published><updated>2013-05-09T18:02:05.220+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".net"/><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="mvc4"/><title type='text'>MVC4 auto refresh partial view</title><content type='html'>&lt;p&gt;* Create new MVC4 application and make sure you configure unobtrusive-ajax as described in &lt;a href=&quot;http://www.itdevspace.com/2012/03/how-to-use-mvc3-with-ajax.html&quot; target=&quot;_blank&quot;&gt;How to use MVC3 with AJAX&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;* Create Controller /Controllers/HomeController.cs&lt;/p&gt;  &lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; HomeController : Controller
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;{
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; ActionResult Index()
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    var model = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; ViewModel();
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    model.Now = DateTime.Now.ToString();
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; View(model);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; ActionResult Refresh()
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    var model = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; ViewModel();
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    model.Now = DateTime.Now.ToString();
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; PartialView(&amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;IndexPartial&lt;/span&gt;&amp;quot;, model);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;}
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; ViewModel
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;{
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; Now { &lt;span style=&quot;color: #0000ff&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff&quot;&gt;set&lt;/span&gt;; }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;}&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;* Create view /Views/Home/Index.cshtml&lt;/p&gt;

&lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;@using MVCTest.Controllers
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;@{
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  ViewBag.Title = &amp;quot;Index&amp;quot;;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;}
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;h2&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;Index&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;h2&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;a&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;title&lt;/span&gt;=&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;quot;Refresh now&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;Refresh Now&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;a&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;quot;toggleButton&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;title&lt;/span&gt;=&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;quot;Auto refresh every 5 seconds&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;Auto Refresh&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;quot;PartialDiv&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  @Html.Partial(&amp;quot;IndexPartial&amp;quot;, (ViewModel)Model)  
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;script&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  var autoRefresh = false;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  var autoRefreshInterval = 1000 * 5;   //mili seconds (set to 5 seconds)
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  $(document).ready(function () {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    $(&#39;a#button&#39;).click(function () {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      $(&#39;#PartialDiv&#39;).load(&#39;@Url.Action(&amp;quot;Refresh&amp;quot;, &amp;quot;Home&amp;quot;)&#39;);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    });
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    $(&#39;a#toggleButton&#39;).click(function () {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      $(&#39;#PartialDiv&#39;).load(&#39;@Url.Action(&amp;quot;Refresh&amp;quot;, &amp;quot;Home&amp;quot;)&#39;);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      $(this).toggleClass(&amp;quot;down&amp;quot;);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      if ($(this).is(&#39;.down&#39;)) {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;        autoRefresh = true;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      } else {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;        autoRefresh = false;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    });
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    var refresh = function () {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      if (autoRefresh) {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;        $(&#39;#PartialDiv&#39;).load(&#39;@Url.Action(&amp;quot;Refresh&amp;quot;, &amp;quot;Home&amp;quot;)&#39;);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      setTimeout(refresh, autoRefreshInterval);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    };
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    refresh();
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  });
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;* Create partial view /Views/Home/IndexPartial.cshtml&lt;/p&gt;

&lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;h2&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;@Model.Now&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;h2&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;* Add these css classes to your Site.css file&lt;/p&gt;

&lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #800000&quot;&gt;#button&lt;/span&gt; {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #ff0000&quot;&gt;cursor&lt;/span&gt;: &lt;span style=&quot;color: #0000ff&quot;&gt;pointer&lt;/span&gt;;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #ff0000&quot;&gt;font-weight&lt;/span&gt;: &lt;span style=&quot;color: #0000ff&quot;&gt;bold&lt;/span&gt;;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;}
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #800000&quot;&gt;#toggleButton&lt;/span&gt; {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #ff0000&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #0000ff&quot;&gt;darkred&lt;/span&gt;;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #ff0000&quot;&gt;font-weight&lt;/span&gt;: &lt;span style=&quot;color: #0000ff&quot;&gt;bold&lt;/span&gt;;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #ff0000&quot;&gt;cursor&lt;/span&gt;: &lt;span style=&quot;color: #0000ff&quot;&gt;pointer&lt;/span&gt;;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;}
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #800000&quot;&gt;#toggleButton&lt;/span&gt;.&lt;span style=&quot;color: #800000&quot;&gt;down&lt;/span&gt; {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #ff0000&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #0000ff&quot;&gt;green&lt;/span&gt;;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #ff0000&quot;&gt;font-weight&lt;/span&gt;: &lt;span style=&quot;color: #0000ff&quot;&gt;bold&lt;/span&gt;;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #ff0000&quot;&gt;cursor&lt;/span&gt;: &lt;span style=&quot;color: #0000ff&quot;&gt;pointer&lt;/span&gt;;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;}&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;* The webpage should look like this with manual &lt;strong&gt;Refresh Now&lt;/strong&gt; button and &lt;strong&gt;Auto Refresh&lt;/strong&gt; toggle button&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFZNgtjFRtF9F2wyplJmHKYpDuTJ0xKXwo7PYDMihuWMJ3BXWKbmb3ldbOhLvZR6viEdi72w5MGj7djeYnhz9meuMD07v2mAImCR66bH0YIymo2gJ7X8AsPvDxMPD5mdaavWZLi9CaZqdS/s1600-h/mvc4-autorefresh%25255B3%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;mvc4-autorefresh&quot; border=&quot;0&quot; alt=&quot;mvc4-autorefresh&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhikH9QxYRZkwBkwGqm_tHQHQBWi_ZMq4m-9k8jIxLhu2R3OGrjPUWcibZwGx94bNTpAhbQFk29PnWgWuceS3yymsH5hACoCMxda0MdmrIPRgIImS5O5qtob78zUkZN9LXkwERoZPt6d3JN/?imgmax=800&quot; width=&quot;236&quot; height=&quot;177&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/4313998049159000176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2013/05/mvc4-auto-refresh-partial-view.html#comment-form' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/4313998049159000176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/4313998049159000176'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2013/05/mvc4-auto-refresh-partial-view.html' title='MVC4 auto refresh partial view'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhikH9QxYRZkwBkwGqm_tHQHQBWi_ZMq4m-9k8jIxLhu2R3OGrjPUWcibZwGx94bNTpAhbQFk29PnWgWuceS3yymsH5hACoCMxda0MdmrIPRgIImS5O5qtob78zUkZN9LXkwERoZPt6d3JN/s72-c?imgmax=800" height="72" width="72"/><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-6530596612775785014</id><published>2013-05-08T15:48:00.001+01:00</published><updated>2013-05-08T15:48:30.443+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".net"/><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><title type='text'>Remote debugging from Visual Studio</title><content type='html'>&lt;p&gt;Copy &lt;strong&gt;RemoteDebugger&lt;/strong&gt; to remote machine from your local Visual Studio directory &lt;/p&gt;  &lt;p&gt;&lt;em&gt;(This is path for VS2010)&lt;/em&gt;&lt;/p&gt;  &lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;Start remote debugging monitor on the server &lt;strong&gt;‘msvsmon.exe’&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Go to Tools/Options and select &lt;strong&gt;‘No Authentication (native only)’&lt;/strong&gt; and &lt;strong&gt;‘Allow any user to debug’&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-ly4dXJ-hYL1XVnkJ2u9dB0XUiTxp1B2hgBPyb4CTNpRA6xpQhjiKWkwDCsx36DiB9AqMRQc6_GaYmz0CEoxZcCf3XHa4wuoSTY7i0Hs1BTbo91B8RNByjyEBk311UmeecQBfAmcSFaoM/s1600-h/remote-debugging%25255B3%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;remote-debugging&quot; border=&quot;0&quot; alt=&quot;remote-debugging&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC6ylHli0aWRzyjxiwfFvW3Kr7Ot7vszP9p76AwAeEw-2kpJoJlj1fO8Ne1BIoXJzZy8wfTSTLVYT6gOI5pSEGiod8Z_3JKda0t6IkmOpfhz7zHjFrwaoMJiF3CyRH1G5aVsediSNoH93T/?imgmax=800&quot; width=&quot;410&quot; height=&quot;298&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In your Visual Studio select &lt;strong&gt;‘Debug/Attach to Process’&lt;/strong&gt;, specify Transport as &lt;strong&gt;‘Remote (Native only with no authentication)’&lt;/strong&gt; and put your server name as Qualifier, click Refresh and you should see the list of processes on the remote machine. &lt;/p&gt;

&lt;p&gt;Select the process you want to debug and click &lt;strong&gt;‘Attach’&lt;/strong&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/6530596612775785014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2013/05/remote-debugging-from-visual-studio.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/6530596612775785014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/6530596612775785014'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2013/05/remote-debugging-from-visual-studio.html' title='Remote debugging from Visual Studio'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC6ylHli0aWRzyjxiwfFvW3Kr7Ot7vszP9p76AwAeEw-2kpJoJlj1fO8Ne1BIoXJzZy8wfTSTLVYT6gOI5pSEGiod8Z_3JKda0t6IkmOpfhz7zHjFrwaoMJiF3CyRH1G5aVsediSNoH93T/s72-c?imgmax=800" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-6307733568374591120</id><published>2013-05-08T15:26:00.001+01:00</published><updated>2013-05-08T15:26:19.711+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".net"/><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="nuget"/><title type='text'>Using NuGet without committing packages to source control</title><content type='html'>&lt;p&gt;&lt;a href=&quot;http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages&quot; target=&quot;_blank&quot;&gt;Using NuGet without committing packages to source control&lt;/a&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/6307733568374591120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2013/05/using-nuget-without-committing-packages.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/6307733568374591120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/6307733568374591120'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2013/05/using-nuget-without-committing-packages.html' title='Using NuGet without committing packages to source control'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-7768221159320414280</id><published>2013-04-04T15:37:00.001+01:00</published><updated>2013-04-04T15:38:38.971+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".net"/><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><title type='text'>C# ConcurrentQueue with limited number of items</title><content type='html'>&lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; LimitedConcurrentQueue&amp;lt;T&amp;gt; : ConcurrentQueue&amp;lt;T&amp;gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;{
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; Size { &lt;span style=&quot;color: #0000ff&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;set&lt;/span&gt;; }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; LimitedConcurrentQueue(&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; size)
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    Size = size;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Enqueue(T obj)
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;base&lt;/span&gt;.Enqueue(obj);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;lock&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;)
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      &lt;span style=&quot;color: #0000ff&quot;&gt;while&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;base&lt;/span&gt;.Count &amp;gt; Size)
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;        T outObj;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;base&lt;/span&gt;.TryDequeue(&lt;span style=&quot;color: #0000ff&quot;&gt;out&lt;/span&gt; outObj);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;}
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;[Test]
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; TestLimitedConcurrentQueue()
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;{
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  var queue = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; LimitedConcurrentQueue&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;&amp;gt;(3);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  queue.Enqueue(1);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  queue.Enqueue(2);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  queue.Enqueue(3);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  Console.WriteLine(&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;.Join(&amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;,&lt;/span&gt;&amp;quot;, queue.ToArray()));
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #008000&quot;&gt;//gives 1,2,3&lt;/span&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  queue.Enqueue(4);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  Console.WriteLine(&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;.Join(&amp;quot;&lt;span style=&quot;color: #8b0000&quot;&gt;,&lt;/span&gt;&amp;quot;, queue.ToArray()));
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #008000&quot;&gt;//gives 2,3,4&lt;/span&gt;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;}&lt;/pre&gt;&lt;/pre&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/7768221159320414280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2013/04/c-concurrentqueue-with-limited-number.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/7768221159320414280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/7768221159320414280'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2013/04/c-concurrentqueue-with-limited-number.html' title='C# ConcurrentQueue with limited number of items'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-291228850240871595</id><published>2013-04-02T15:32:00.001+01:00</published><updated>2013-04-02T15:34:29.193+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".net"/><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="linq"/><title type='text'>C# LINQ inner and left outer join</title><content type='html'>&lt;p&gt;Left outer join extension method is based on &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/vstudio/bb397895.aspx&quot; target=&quot;_blank&quot;&gt;How to: Perform Left Outer Joins&lt;/a&gt; article.&lt;/p&gt;  &lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;[Test]
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Test()
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;{
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  var list1 = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; List&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;&amp;gt;() { 1, 2, 3, 4, 5}.Select(x=&amp;gt;&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; {a=x, b=x*x});
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  var list2 = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; List&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;&amp;gt;() { 1, 2, 3, 4 }.Select(x =&amp;gt; &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; { a = x, b = x * x * x });
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  var innerJoin = list1.Join(list2, x =&amp;gt; x.a, y =&amp;gt; y.a, (x, y) =&amp;gt; &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; {a = x.a, b = x.b, c = y.b});
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  innerJoin.ForEach(Console.WriteLine);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  var leftOuterJoin = list1.LeftOuterJoin(list2, x =&amp;gt; x.a, y =&amp;gt; y.a, (x, y) =&amp;gt; &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; { a = x.a, b = x.b, c = (y != &lt;span style=&quot;color: #0000ff&quot;&gt;null&lt;/span&gt;) ? y.b : (&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;?)&lt;span style=&quot;color: #0000ff&quot;&gt;null&lt;/span&gt; });
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  leftOuterJoin.ForEach(Console.WriteLine);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;}
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; Extensions
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;{
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; IEnumerable&amp;lt;TResult&amp;gt; LeftOuterJoin&amp;lt;TOuter, TInner, TKey, TResult&amp;gt;(
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt; IEnumerable&amp;lt;TOuter&amp;gt; outer, 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    IEnumerable&amp;lt;TInner&amp;gt; inner, 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    Func&amp;lt;TOuter, TKey&amp;gt; outerKeySelector, 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    Func&amp;lt;TInner, TKey&amp;gt; innerKeySelector, 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    Func&amp;lt;TOuter, TInner, TResult&amp;gt; resultSelector)
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  {
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      from outerItem &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; outer
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      join innerItem &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; inner on outerKeySelector(outerItem) equals innerKeySelector(innerItem) into gj
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      from sub &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; gj.DefaultIfEmpty()
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;      select resultSelector(outerItem, sub);
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;  }
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;}&lt;/pre&gt;&lt;/pre&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/291228850240871595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2013/04/c-linq-inner-and-left-outer-join.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/291228850240871595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/291228850240871595'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2013/04/c-linq-inner-and-left-outer-join.html' title='C# LINQ inner and left outer join'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1009430530424913741.post-1249257455152662496</id><published>2013-03-27T12:23:00.001+00:00</published><updated>2013-05-08T15:30:45.096+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".net"/><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>Run 32bit .Net application with &amp;gt;2GB RAM on 64bit machine</title><content type='html'>&lt;p&gt;To allow your 32bit application use more than 2GB of RAM you need to modify the *.exe file with &lt;strong&gt;editbin&lt;/strong&gt; utility. (open ‘Visual Studio Command Prompt’ and it will be on the path)&lt;/p&gt;  &lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;editbin /LARGEADDRESSAWARE &amp;lt;your-app.exe&amp;gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;or just add these 2 lines to your Post-build event in Visual Studio&lt;/p&gt;

&lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;call &amp;quot;$(DevEnvDir)..\tools\vsvars32.bat&amp;quot;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;editbin /LARGEADDRESSAWARE &amp;quot;$(TargetPath)&amp;quot;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;or these if you are building your project with msbuild outside of Visual Studio&lt;/p&gt;

&lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;call &amp;quot;%VS100COMNTOOLS%\vsvars32.bat&amp;quot;
&lt;/pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;editbin /LARGEADDRESSAWARE &amp;quot;$(TargetPath)&amp;quot;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;To check if all ok run dumpbin utility as below and check if the output has ‘Application can handle large (&amp;gt;2GB) addresses’ text in FILE HEADER VALUES.&lt;/p&gt;

&lt;pre&gt;&lt;pre style=&quot;background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px&quot;&gt;dumpbin /headers &amp;lt;your-app.exe&amp;gt;&lt;/pre&gt;&lt;/pre&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.itdevspace.com/feeds/1249257455152662496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.itdevspace.com/2013/03/run-32bit-net-application-with-ram-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/1249257455152662496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1009430530424913741/posts/default/1249257455152662496'/><link rel='alternate' type='text/html' href='http://www.itdevspace.com/2013/03/run-32bit-net-application-with-ram-on.html' title='Run 32bit .Net application with &amp;gt;2GB RAM on 64bit machine'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>