<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="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" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-133161131714718506</atom:id><lastBuildDate>Thu, 19 Dec 2024 03:23:32 +0000</lastBuildDate><category>All</category><category>C#</category><category>HTML</category><category>JavaScript</category><category>Sql Server</category><category>Visual Studio</category><category>WCF</category><title>Express .Net</title><description>A place where .NET phenomena is expressed</description><link>http://expressdotnet.blogspot.com/</link><managingEditor>noreply@blogger.com (Sonu Singh)</managingEditor><generator>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-133161131714718506.post-7176254831262518832</guid><pubDate>Mon, 29 Dec 2014 14:11:00 +0000</pubDate><atom:updated>2014-12-29T06:11:12.489-08:00</atom:updated><title>CrazzyGig: Internationalization Automation Testing using WebD...</title><description>&lt;a href=&quot;http://crazzygig.blogspot.com/2014/12/internationalization-automation-testing.html?spref=bl&quot;&gt;CrazzyGig: Internationalization Automation Testing using WebD...&lt;/a&gt;: Internationalization , a subset of Globalization also known as i18n .     With the increasing competition in software industry, Organizati...</description><link>http://expressdotnet.blogspot.com/2014/12/crazzygig-internationalization.html</link><author>noreply@blogger.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-133161131714718506.post-657573111991845874</guid><pubDate>Mon, 01 Dec 2014 19:28:00 +0000</pubDate><atom:updated>2014-12-01T11:28:54.938-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">All</category><title>ASP.NET Interview Kit</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div id=&quot;fb-root&quot;&gt;
&lt;/div&gt;
&lt;script&gt;(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = &quot;//connect.facebook.net/en_US/all.js#xfbml=1&quot;; fjs.parentNode.insertBefore(js, fjs); }(document, &#39;script&#39;, &#39;facebook-jssdk&#39;));&lt;/script&gt;

&lt;br /&gt;
&lt;div class=&quot;fb-post&quot; data-href=&quot;https://www.facebook.com/ExpressDotNet/posts/715331525169917&quot; data-width=&quot;466&quot;&gt;
&lt;div class=&quot;fb-xfbml-parse-ignore&quot;&gt;
&lt;a href=&quot;https://www.facebook.com/ExpressDotNet/posts/715331525169917&quot;&gt;Post&lt;/a&gt; by &lt;a href=&quot;https://www.facebook.com/ExpressDotNet&quot;&gt;Express .NET&lt;/a&gt;.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><link>http://expressdotnet.blogspot.com/2014/12/functiond-s-id-var-js-fjs-d.html</link><author>noreply@blogger.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-133161131714718506.post-2533467501516890870</guid><pubDate>Sat, 28 Jun 2014 04:45:00 +0000</pubDate><atom:updated>2014-06-27T21:45:13.201-07:00</atom:updated><title>CrazzyGig: Mobile Automation With Android WebDriver</title><description>&lt;a href=&quot;http://crazzygig.blogspot.com/2014/05/mobile-automation-with-android-webdriver.html?spref=bl&quot;&gt;CrazzyGig: Mobile Automation With Android WebDriver&lt;/a&gt;: Setup Instructions to Android Webdriver   Pre-Requisites:   Download Android SDK  Unzip it and place it somewhere in directory  Go to /andr...</description><link>http://expressdotnet.blogspot.com/2014/06/crazzygig-mobile-automation-with.html</link><author>noreply@blogger.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-133161131714718506.post-8752952741085111289</guid><pubDate>Sat, 17 May 2014 10:14:00 +0000</pubDate><atom:updated>2014-05-17T03:14:22.851-07:00</atom:updated><title>CrazzyGig: Mobile Automation With Android WebDriver</title><description>&lt;a href=&quot;http://crazzygig.blogspot.com/2014/05/mobile-automation-with-android-webdriver.html?spref=bl&quot;&gt;CrazzyGig: Mobile Automation With Android WebDriver&lt;/a&gt;: Setup Instructions to Android Webdriver   Pre-Requisites:   Download Android SDK  Unzip it and place it somewhere in directory  Go to /andr...</description><link>http://expressdotnet.blogspot.com/2014/05/crazzygig-mobile-automation-with.html</link><author>noreply@blogger.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-133161131714718506.post-588823001958577364</guid><pubDate>Sun, 04 May 2014 09:06:00 +0000</pubDate><atom:updated>2014-05-04T06:08:20.896-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">HTML</category><title>How to add Favicon</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h5&gt;
Introduction&lt;/h5&gt;
Favicon is a image\icon displayed alongside the address of a website and also shown as icon in your favorite/bookmark list of website.&lt;br /&gt;
&lt;a href=&quot;http://lh6.ggpht.com/-xyJIvRZ9lwA/U2YDAu7p3pI/AAAAAAAAALY/YLQk6-icgU8/s1600-h/image%25255B11%25255D.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; src=&quot;http://lh3.ggpht.com/-M9XH-J184aM/U2YDBZyPzjI/AAAAAAAAALg/lUXPAEP1WeM/image_thumb%25255B7%25255D.png?imgmax=800&quot; height=&quot;61&quot; style=&quot;background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;
&lt;br /&gt;
&lt;h5&gt;
How to add a favicon&lt;/h5&gt;
&lt;ol&gt;
&lt;li&gt;Create a icon (.ico) file which you want to show in address bar, on tab or icon in favorite item.  &lt;/li&gt;
&lt;li&gt;Name it as &lt;strong&gt;&lt;em&gt;favicon.ico&lt;/em&gt;&lt;/strong&gt; and place it on the root folder of your website.  &lt;/li&gt;
&lt;li&gt;Add below tag under &lt;strong&gt;&lt;em&gt;&amp;lt;Head&amp;gt;&lt;/em&gt;&lt;/strong&gt; section.&lt;pre class=&quot;csharpcode&quot;&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;link&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;favicon.ico&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;rel&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;Shortcut Icon&quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h5&gt;
Points to remember&lt;/h5&gt;
&lt;ol&gt;
&lt;li&gt;Size of icon should not exceed dimension 16 x 16. &lt;/li&gt;
&lt;li&gt;Browsers can keep your favicon on their cache, so even if you have changed it, old icon can still be shown to user by browser.&amp;nbsp; &lt;/li&gt;
&lt;li&gt;In case above line of code is not working try using this.&lt;pre class=&quot;csharpcode&quot;&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;link&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;rel&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;icon&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;image/ico&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;favicon.ico&quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type=&quot;text/css&quot;&gt;.csharpcode, .csharpcode pre{ font-size: small; color: black; font-family: consolas, &quot;Courier New&quot;, courier, monospace; background-color: #ffffff; /*white-space: pre;*/}.csharpcode pre { margin: 0em; }.csharpcode .rem { color: #008000; }.csharpcode .kwrd { color: #0000ff; }.csharpcode .str { color: #006080; }.csharpcode .op { color: #0000c0; }.csharpcode .preproc { color: #cc6633; }.csharpcode .asp { background-color: #ffff00; }.csharpcode .html { color: #800000; }.csharpcode .attr { color: #ff0000; }.csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em;}.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;a href=&quot;http://www.codeproject.com/&quot; rel=&quot;tag&quot; style=&quot;display: none;&quot;&gt;CodeProject&lt;/a&gt;&lt;/div&gt;
</description><link>http://expressdotnet.blogspot.com/2014/05/how-to-add-favicon.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-M9XH-J184aM/U2YDBZyPzjI/AAAAAAAAALg/lUXPAEP1WeM/s72-c/image_thumb%25255B7%25255D.png?imgmax=800" height="72" width="72"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-133161131714718506.post-8890368710904030669</guid><pubDate>Sat, 22 Mar 2014 08:57:00 +0000</pubDate><atom:updated>2014-03-22T01:57:14.531-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">All</category><title>Android Architecture</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div id=&quot;fb-root&quot;&gt;
&lt;/div&gt;
&lt;script&gt;(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = &quot;//connect.facebook.net/en_US/all.js#xfbml=1&quot;; fjs.parentNode.insertBefore(js, fjs); }(document, &#39;script&#39;, &#39;facebook-jssdk&#39;));&lt;/script&gt;

&lt;div class=&quot;fb-post&quot; data-href=&quot;https://www.facebook.com/photo.php?fbid=646246485411755&amp;amp;set=a.563617980341273.1073741827.561822780520793&amp;amp;type=1&quot; data-width=&quot;550&quot;&gt;
&lt;div class=&quot;fb-xfbml-parse-ignore&quot;&gt;
&lt;a href=&quot;https://www.facebook.com/photo.php?fbid=646246485411755&amp;amp;set=a.563617980341273.1073741827.561822780520793&amp;amp;type=1&quot;&gt;Post&lt;/a&gt; by &lt;a href=&quot;https://www.facebook.com/ExpressDotNet&quot;&gt;Express .NET&lt;/a&gt;.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><link>http://expressdotnet.blogspot.com/2014/03/android-architecture.html</link><author>noreply@blogger.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-133161131714718506.post-2286311472495698174</guid><pubDate>Fri, 20 Dec 2013 07:06:00 +0000</pubDate><atom:updated>2013-12-21T05:37:13.312-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">All</category><title>HDInsight: Microsoft&#39;s way to work with Hadoop and Big Data.</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;HDInsight: Microsoft&#39;s move to gain share in Big Data Market. After trying to create its own big data management platform, aka dryad, LINQ to HPC, Microsoft has decided to stop researching on it and exploring Apache open source big data platform HADOOP. A well established and widely used big data platform for performing computation over big data.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;With partnership of Hortonworks, Microsoft has successfully delivered HDInsight: Hadoop Eco-System for Windows Server and Windows Azure. Also empowered Microsoft&#39;s products SQL Server, Excel, C#, LINQ to work with Hadoop Eco-System.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Take a look of its high-level architecture.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjqUtpDoURlriNWf2RsRujKaa4atjPexHaUEBdGluXnThlusDtRyjahQT0k6K4e9PiG1y2PpPQFpBKju2UDXi9ooistlpnt00Cpbyu9kG9H4nxm91M92SjT50w26xm_MMBoO_wFHRwoRw/s1600/hdinsight+Express.Net.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; margin-bottom: 1em;&quot;&gt;&lt;img alt=&quot;HDInsight / Hadoop Eco-System&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjqUtpDoURlriNWf2RsRujKaa4atjPexHaUEBdGluXnThlusDtRyjahQT0k6K4e9PiG1y2PpPQFpBKju2UDXi9ooistlpnt00Cpbyu9kG9H4nxm91M92SjT50w26xm_MMBoO_wFHRwoRw/s1600/hdinsight+Express.Net.jpg&quot; height=&quot;353&quot; title=&quot;HDInsight / Hadoop Eco-System&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href=&quot;http://www.codeproject.com/&quot; rel=&quot;tag&quot; style=&quot;display: none;&quot;&gt;CodeProject&lt;/a&gt;&lt;/div&gt;
</description><link>http://expressdotnet.blogspot.com/2013/12/hdinsight-microsofts-way-to-work-with.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjqUtpDoURlriNWf2RsRujKaa4atjPexHaUEBdGluXnThlusDtRyjahQT0k6K4e9PiG1y2PpPQFpBKju2UDXi9ooistlpnt00Cpbyu9kG9H4nxm91M92SjT50w26xm_MMBoO_wFHRwoRw/s72-c/hdinsight+Express.Net.jpg" height="72" width="72"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-133161131714718506.post-6379107258254517590</guid><pubDate>Wed, 27 Nov 2013 04:29:00 +0000</pubDate><atom:updated>2013-11-26T20:29:46.578-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">All</category><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><title>Refreshing Parent window when Pop Up window is closed in Java Script</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Open a pop-up:&lt;/h3&gt;
We have two very easy and common way of opening a new window in JavaScript.&lt;br /&gt;
&lt;br /&gt;
1. Using &lt;i&gt;winodw.Open()&lt;/i&gt; method.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;i&gt;window.open(&quot;http://expressdotnet.blogspot.in/&quot;,&quot;&quot;,&quot;width=200,height=100&quot;);&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
2. Using &lt;i&gt;window.showMModalDialog()&lt;/i&gt; method.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;i&gt;window.showModalDialog(&quot;http://expressdotnet.blogspot.in/&quot;, &quot;&quot;, &quot;dialogHeight: 481px; dialogWidth: 718px;&quot;)&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Refresh Parent window:&lt;/h3&gt;
1. When using &lt;i&gt;window.open()&lt;/i&gt; method, we get reference of parent window from window.opener property.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;use window.opener.location.reload() method to refresh parent window.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
2. When using &lt;i&gt;window.showModalDialog()&lt;/i&gt; method, new window opens as a modal dialog and execution of code of parent window stops until pop-up gets closed.&lt;br /&gt;
we can use this behaviour and can call &lt;i&gt;&lt;b&gt;window.location.reload()&lt;/b&gt;&lt;/i&gt; method, just after line &lt;i&gt;window.showModalDialog()&lt;/i&gt;.&lt;/div&gt;
</description><link>http://expressdotnet.blogspot.com/2013/11/refreshing-parent-window-when-pop-up.html</link><author>noreply@blogger.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-133161131714718506.post-6333838735326645475</guid><pubDate>Fri, 08 Nov 2013 17:05:00 +0000</pubDate><atom:updated>2013-12-21T05:31:32.858-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">All</category><category domain="http://www.blogger.com/atom/ns#">Visual Studio</category><title>PEEK DEFINITION: VS 2013 [New feature]</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div id=&quot;fb-root&quot;&gt;
&lt;/div&gt;
&lt;script&gt;(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = &quot;//connect.facebook.net/en_US/all.js#xfbml=1&quot;; fjs.parentNode.insertBefore(js, fjs); }(document, &#39;script&#39;, &#39;facebook-jssdk&#39;));&lt;/script&gt;

&lt;br /&gt;
&lt;div class=&quot;fb-post&quot; data-href=&quot;https://www.facebook.com/photo.php?v=620109891361315&quot; data-width=&quot;550&quot;&gt;
&lt;div class=&quot;fb-xfbml-parse-ignore&quot;&gt;
&lt;a href=&quot;https://www.facebook.com/photo.php?v=620109891361315&quot;&gt;Post&lt;/a&gt; by &lt;a href=&quot;https://www.facebook.com/ExpressDotNet&quot;&gt;Express .NET&lt;/a&gt;.&lt;/div&gt;
&lt;/div&gt;
&lt;a href=&quot;http://www.codeproject.com/&quot; rel=&quot;tag&quot; style=&quot;display: none;&quot;&gt;CodeProject&lt;/a&gt;
&lt;/div&gt;
</description><link>http://expressdotnet.blogspot.com/2013/11/peek-definition-vs-2013-new-feature.html</link><author>noreply@blogger.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-133161131714718506.post-2607187987524296538</guid><pubDate>Sat, 19 Oct 2013 11:25:00 +0000</pubDate><atom:updated>2013-12-21T05:32:17.213-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">All</category><category domain="http://www.blogger.com/atom/ns#">Sql Server</category><title>Rowversion datatype in Sql Server: Track which row has been modified.</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h1&gt;
&lt;u&gt;
Introduction &lt;/u&gt;&lt;/h1&gt;
&lt;br /&gt;
Very Often while working with data, our requirement is to retrieve which data has been modified and keep to data in two tables in synchronized. For achieving this task SQL Server has provided many way such as CDC (Change Data Capture), rowversion datatype, MERGE statement and various other alternatives using such as joins , storing datetime etc, which can be used based on our requirement.&lt;br /&gt;
Here, we will discuss about rowversion datatype and see a small demo how we use rowversion to Sync data changes done in a table to other table.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;
&lt;u&gt;
About rowversion&lt;/u&gt;&lt;/h1&gt;
&lt;br /&gt;
rowversion is a datatype which exposes 8 byte binary number, unique within a database. It is generally used for version stamping a table row. It means value of column of datatype rowversion f a particular row gets changed, whenever value of any column of that row gets changed(updated). When a new insertion is made in table rowversion datatype column automatically get populated with a unique value. &lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
How to create a table with rowversion Data type? &lt;/h3&gt;
&lt;br /&gt;
CREATE TABLE Product
(&lt;br /&gt;
&amp;nbsp;ProductID INT IDENTITY PRIMARY KEY&lt;br /&gt;
, ProductName VARCHAR(100) NOT NULL&lt;br /&gt;
, ProductCatagory VARCHAR(20) NOT NULL&lt;br /&gt;
, ManufacturedBy VARCHAR(100) NOT NULL&lt;br /&gt;
, ProductKey rowversion&lt;br /&gt;
--,ProductKey1 rowversion&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, Point to note is that, only one column of rowversion datatype is allowed per table. So, if we try to create another column of same datatype ProductKey1 by un-commenting it, we will end up with error (&quot;&lt;i&gt;A table can only have one timestamp column. Because table &#39;Product&#39; already has one, the column &#39;ProductKey1&#39; cannot be added.&lt;/i&gt;&quot;) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Insertion and Updation: &lt;/h3&gt;
&lt;br /&gt;
&lt;br /&gt;
Insertion and Updation on rowversion datatype column is not allowed. If you try, you will get below error. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
INSERT INTO Product(ProductName , ProductCatagory, ManufacturedBy, ProductKey)&lt;br /&gt;
VALUES (&#39;Keyboard&#39;,&#39;Peripheral&#39;,&#39;Microsoft&#39;,CONVERT(BINARY(8),GETDATE()))&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;i&gt;--Msg 273, Level 16, State 1, Line 1 Cannot insert an explicit value into a timestamp column&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
UPDATE Product 
SET ProductKey= &#39;0x000000000E1EB636&#39; 
WHERE ProductID = 1&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&amp;nbsp;--Msg 272, Level 16, State 1, Line, Cannot update a timestamp column.

&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have noticed, every time SQL Server is generating error, it is referring rowversion datatype as timestamp. This is because rowversion is the synonym for timestamp. Since in ANSI SQL, timestamp is a data type for date and time and SQL server doesn&#39;t track an actual time that can be associated with a clock date and time, but represents relative time within a database. Microsoft decided to deprecated timestamp syntax in future version and provided a synonym rowversion. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
How Does it works?   &lt;/h3&gt;
&lt;br /&gt;
&lt;br /&gt;
MSDN states that every database has a counter referred as Database rowversion  This counter gets incremented for each insert or update operation that is performed on a table that contains a rowversion column within the database and this value is inserted or updated in rowversion column of the table. If any point of time you need to check value of this counter, use this: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SELECT @@DBTS; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
Demo&lt;/h2&gt;
&lt;br /&gt;
Apart from the uses explained on MSDN, we can also use this to track changes in one table and update the changes in other table. lets see a small demonstration.&lt;br /&gt;
&lt;br /&gt;
Before we start please treat below code written for illustration purpose only. Now lets say we have two table oneProduct (created above) and another PurchaseOrder. Some how our requirement is to keep update data of columns [ProductId], [ProductName] and [ProductCategory] of Product Table into PurchaseOrder table along with some other data. We can do this by creating a column [ProductKey] of rowversion datatype in Product table, so that we can find out data of which row has been changed from last time we read data from it and a column of BINARYdatatype in PurchaseOrder table to store value of [ProductKey] column of Product table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
lets create PurchaseOrder table, Insert some test data in Product table and alsoin PurchaseOrder Table. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE PurchaseOrder
(&lt;br /&gt;
&amp;nbsp;ProductId INT FOREIGN KEY REFERENCES Product(ProductId)&lt;br /&gt;
, ProductName VARCHAR(100) NOT NULL&lt;br /&gt;
, ProductCatagory VARCHAR(20) NOT NULL&lt;br /&gt;
, Price DECIMAL NOT NULL&lt;br /&gt;
, Quantity INT&lt;br /&gt;
, ProductKey BINARY(8)
)&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&amp;nbsp;-- Insert test Data in Product Table&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
INSERT INTO Product(ProductName , ProductCatagory, ManufacturedBy)&lt;br /&gt;
VALUES (&#39;Keyboard&#39;,&#39;Peripheral&#39;,&#39;Microsoft&#39;)&lt;br /&gt;
&amp;nbsp;, (&#39;Mouse&#39;,&#39;Peripheral&#39;,&#39;Microsoft&#39;)&lt;br /&gt;
&amp;nbsp;, (&#39;Headphone&#39;,&#39;Peripheral&#39;,&#39;Microsoft&#39;)&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&amp;nbsp;-- Insert test data in PurchaseOrder Table&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
INSERT INTO PurchaseOrder&lt;br /&gt;
&amp;nbsp;(ProductId , ProductName , ProductCatagory , Price , Quantity , ProductKey)&lt;br /&gt;
SELECT ProductId , ProductName , ProductCatagory , ProductId * 100 , ProductId*2 , ProductKey
FROM Product 
 
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By this time when you will execute SELECT Statement on both table, you will fine both table are in Sync. Now let&#39;s change data in Product table. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
UPDATE Product&lt;br /&gt;
SET ProductName = &#39;WireLess Keyboad&#39;&lt;br /&gt;
&amp;nbsp;, ProductCatagory =&#39;Keyboad&#39;&lt;br /&gt;
OUTPUT deleted.ProductKey &#39;Old Prod Key&#39;&lt;br /&gt;
WHERE ProductName = &#39;Keyboard&#39;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use below query to check, which data has been chnaged. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SELECT P.* FROM Product P&lt;br /&gt;
JOIN PurchaseOrder PO&lt;br /&gt;
&amp;nbsp; ON P.ProductID = PO.ProductId&lt;br /&gt;
&amp;nbsp; AND P.ProductKey &amp;lt;&amp;gt; PO.ProductKey 
 
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For Syncronization you can use either of follwing way. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;-- 1: Using JOIN&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;UPDATE PO&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SET ProductName= P.ProductName&lt;br /&gt;
&amp;nbsp; , ProductCatagory = P.ProductCatagory&lt;br /&gt;
&amp;nbsp; , ProductKey = P.ProductKey&lt;br /&gt;
FROM Product P&lt;br /&gt;
JOIN PurchaseOrder PO&lt;br /&gt;
&amp;nbsp; &amp;nbsp;ON P.ProductID = PO.ProductId&lt;br /&gt;
&amp;nbsp; &amp;nbsp;AND P.ProductKey &amp;lt;&amp;gt; PO.ProductKey&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&amp;nbsp;-- 2: Using MERGE Statement&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
;
MERGE INTO PurchaseOrder TargetTable&lt;br /&gt;
USING Product SourceTable&amp;nbsp; &lt;br /&gt;
ON TargetTable.ProductId = SourceTable.ProductId&lt;br /&gt;
WHEN MATCHED&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; AND TargetTable.ProductKey &amp;lt;&amp;gt; SourceTable.ProductKey&lt;br /&gt;
THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; UPDATE 
 SET ProductName= SourceTable.ProductName&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;, ProductCatagory = SourceTable.ProductCatagory&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;, ProductKey = SourceTable.ProductKey 
; 
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
Points to remember  &lt;/h2&gt;
&lt;br /&gt;
&lt;br /&gt;
Since Data of rowversion column gets changed, if any update occurs on that row, it is very poor candidate for Keys. if it is a key then, even update on any non key column, will also generate Index Update.  &lt;br /&gt;
We should not make it Primary Key as well because of the Index Update explained above and also referencing foreign key can loose their values which they are referring to. &lt;br /&gt;
Value of rowversion gets changed even for false update. See result of below code, We are updating ProductName with the same value &#39;Keyboard&#39;, which is its current value, even than value of ProductKey [rowversion DataType] column got changed. &lt;br /&gt;
&lt;br /&gt;
References&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. &lt;a href=&quot;http://technet.microsoft.com/en-us/library/ms182776.aspx&quot;&gt;More about rowversion datatype. &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://technet.microsoft.com/en-us/library/ms182776.aspx&quot;&gt;&lt;/a&gt;2. &lt;a href=&quot;http://technet.microsoft.com/en-us/library/ms177564.aspx&quot;&gt;More about OUTPUT clause. &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://technet.microsoft.com/en-us/library/ms177564.aspx&quot;&gt;&lt;/a&gt;3. &lt;a href=&quot;http://technet.microsoft.com/en-us/library/bb510625.aspx&quot;&gt;More about MERGE statement.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!! Happy Programming !! &lt;/div&gt;
&lt;a href=&quot;http://www.codeproject.com/&quot; rel=&quot;tag&quot; style=&quot;display: none;&quot;&gt;CodeProject&lt;/a&gt;&lt;/div&gt;
</description><link>http://expressdotnet.blogspot.com/2013/10/rowversion-datatype-in-sql-server-track.html</link><author>noreply@blogger.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-133161131714718506.post-5120853644072326884</guid><pubDate>Fri, 11 Oct 2013 17:59:00 +0000</pubDate><atom:updated>2013-12-21T05:34:38.083-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">All</category><category domain="http://www.blogger.com/atom/ns#">WCF</category><title>WCF Security Basic: Part 1</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;WCF Security is a very wide topic. So it is better to break into multiple parts to understand it better. In this part, I will be covering very basic of it.&lt;br /&gt;&lt;br /&gt;In WCF, We can apply security measures (authentication and Encryption) at two points when sending and receiving messages: &lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;At Transport Level.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;At Message Level.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;u style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Transport Level Security:&lt;/u&gt;&lt;/h3&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Transport Level Authentication is typically implemented at Operating System level.&lt;br /&gt;Transport Level Encryption and Decryption are facilitated by underlying Communication Protocol.&lt;br /&gt;For Example: HTTPS uses SSL (Secure Socket Layer), TCP uses TSL (Transport Layer Security).&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;u&gt;Message Level Security:&amp;nbsp;&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Message Level Authentication, user&#39;s credentials are passed to service and its responsibility of Service to Authenticate it.&lt;br /&gt;Message Level Encryption and Decryption are done by Service and Client using agreed set of Encryption Key and Encryption Algorithm.&lt;br /&gt;WS-Security recommendations should be followed to ensure interoperability between services developed using other technologies than WCF.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;u&gt; Comparison: &lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Transport Level Security is very efficient because it often relies on underlying hardware and operating system support for encryption and decryption, which can be very resource intensive process.&lt;br /&gt;Transport Level Authentication is enforced before client actually starts sending messages. This results in early detection of Authentication Failure with less Network Overhead.&lt;br /&gt;Message Level Security operates End-To-End basis, While Transport Level Security Operates Point-to-Point basis.&lt;br /&gt;Meaning if there is any intermediate service that passes message from and to, then using Message Level Security is more secure than Transport Level.&lt;br /&gt;In Transport Level, by the time Service receives message it is already authenticated and decrypted and Intermediate Service has full access to the message.&lt;br /&gt;While Since Message Level Security is implemented at Client and Service End, Intermediate Services cannot easily decrypt the message.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;!! Happy Programming !!&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;a href=&quot;http://www.codeproject.com/&quot; rel=&quot;tag&quot; style=&quot;display: none;&quot;&gt;CodeProject&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><link>http://expressdotnet.blogspot.com/2013/10/wcf-security-basic-part-1.html</link><author>noreply@blogger.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-133161131714718506.post-5754805316963812597</guid><pubDate>Tue, 10 Sep 2013 19:33:00 +0000</pubDate><atom:updated>2013-12-21T05:36:30.505-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">All</category><category domain="http://www.blogger.com/atom/ns#">C#</category><title>Constructor in .NET</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Constructors have a very special meaning to Compiler and CLR but some times its meaning and flow seems difficult for a developer. Today I will explain simple but important insights of Constructor.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;u&gt;So, What is a Constructor?&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h4&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A Constructor is a special method in a class/struct with the same name as of class/struct without any return type, used to initialized fields and members of a class/struct;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A constructor can only be called by:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Compiler using New keyword to initialize a class/struct.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Another constructor of same class/struct using :this() keyword.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Constructors of derived class using :base() keyword.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;u&gt;Types of Constructor?&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h4&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Default constructor.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Parameterized Constructor.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Instance Constructor.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Static Constructor.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Private Constructor.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Copy Constructor.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;u&gt;Default Constructor?&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A Constructor with no parameter is called Default Constructor.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Default Constructor is called by compiler when no arguments are passed to New operator while creating a object of class or Struct.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;If there is no constructor in a Non-Static class, a Public Default Constructor is provided by compiler so that a class can be instantiated.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A Struct cannot have an explicit Default Constructor(We can not define an explicit Default Constructor in a struct), but it is always provided by compiler to initialize each field of struct to its default value.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;u&gt;Parameterized Constructor?&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h4&gt;
&lt;div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;div style=&quot;display: inline !important;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A constructor with parameters are called parameterized Constructor.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;display: inline !important;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A Class or Struct can have multiple parameterized constructors as long as they have different method signature. They follow same concept of method overloading.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;display: inline !important;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Compiler provides Default Constructors only if there is no constructor(Default or Parameterized) defined in a class.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;display: inline !important;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Parameterized Constructors can exists even without the existence of Default Constructors.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;h4&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;u&gt;Static Constructor?&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;To initialize a Static Class or Static variables in Non-Static Class, Static Constructors are used;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Access Modifiers are not allowed on Static Constructors;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Static Constructors cannot be parameterized;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;There can be only one Static Constructors per class;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Static Constructors cannot have an explicit &#39;this&#39; or &#39;base&#39; constructor call. i.e Static Constructors cannot be called directly;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Static Constructors are called automatically before first instance of a class is created or any static member is referenced;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Static Constructors are called called only once in lifetime of a class;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;u&gt;Private Constructor?&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;
&lt;li&gt;A constructors becomes private constructor when we declare with private access specifier.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Private Constructors can neither be instantiated nor inherited from other class.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Object of class can only be created in the class itself.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Microsoft recommends its uses to implement Singleton Pattern.&lt;/li&gt;
&lt;/span&gt;&lt;/ol&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Copy Constructor&lt;/span&gt;&lt;/b&gt;&lt;b&gt;?&lt;/b&gt;&lt;/u&gt;&lt;/h4&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A parameterized constructor that contains a parameter of same class type is called as copy constructor. It can be used to initialize a new class from an existing class of same type. &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Constructor Chaining&lt;/span&gt;&lt;/b&gt;&lt;b&gt;?&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;letter-spacing: 1px; line-height: 20.796875px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A constructor can make call to another constructor of same class or of base class;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;letter-spacing: 1px; line-height: 20.796875px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Since one constructor can invoke other, this sometimes can cause execution of multiple constructors and referred to as Constructor chaining;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;letter-spacing: 1px; line-height: 20.796875px;&quot;&gt;If class is not derived from any other class&lt;/span&gt;&lt;span style=&quot;letter-spacing: 1px; line-height: 20.796875px;&quot;&gt;, below would be the chain:&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;letter-spacing: 1px; line-height: 20.796875px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Static Initializer.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;letter-spacing: 1px; line-height: 20.796875px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Static Constructor.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;letter-spacing: 1px; line-height: 20.796875px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Instance Initializer.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;letter-spacing: 1px; line-height: 20.796875px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Instance Constructor&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;span style=&quot;letter-spacing: 1px; line-height: 20.796875px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;If a class is derived from any other class, below would be the chain:&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;letter-spacing: 1px; line-height: 20.796875px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Derived Static Initializer.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;letter-spacing: 1px; line-height: 20.796875px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Derived Static Constructor.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;letter-spacing: 1px; line-height: 20.796875px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Derived Instance Initializer.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;letter-spacing: 1px; line-height: 20.796875px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Base Static Initializer.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;letter-spacing: 1px; line-height: 20.796875px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Base Static Constructor.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;letter-spacing: 1px; line-height: 20.796875px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Base Instance Initializer.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;letter-spacing: 1px; line-height: 20.796875px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Base Instance Constructor.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;letter-spacing: 1px; line-height: 20.796875px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Derived Instance Constructor.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: courier new, courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;letter-spacing: 1px; line-height: 20.796875px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: courier new, courier, monospace;&quot;&gt;&lt;span style=&quot;letter-spacing: 1px; line-height: 20.796875px;&quot;&gt;I hope i have covered all topics related to constructor. Please let me know if i have missed any or you need more explanation or examples.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: courier new, courier, monospace;&quot;&gt;&lt;span style=&quot;letter-spacing: 1px; line-height: 20.796875px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: courier new, courier, monospace;&quot;&gt;&lt;span style=&quot;letter-spacing: 1px; line-height: 20.796875px;&quot;&gt;&lt;i&gt;!! Happy Programming !!&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;a href=&quot;http://www.codeproject.com/&quot; rel=&quot;tag&quot; style=&quot;display: none;&quot;&gt;CodeProject&lt;/a&gt;
&lt;/div&gt;
</description><link>http://expressdotnet.blogspot.com/2013/09/constructor.html</link><author>noreply@blogger.com (Unknown)</author></item></channel></rss>