<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Chakravarthy's Space : First</title><link>http://msmvps.com/blogs/chakravarthy/archive/tags/First/default.aspx</link><description>Tags: First</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Standards @ Microsoft</title><link>http://msmvps.com/blogs/chakravarthy/archive/2008/01/08/standards_2D00_microsoft.aspx</link><pubDate>Tue, 08 Jan 2008 07:08:07 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1446116</guid><dc:creator>Chakravarthy</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/chakravarthy/rsscomments.aspx?PostID=1446116</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/chakravarthy/commentapi.aspx?PostID=1446116</wfw:comment><comments>http://msmvps.com/blogs/chakravarthy/archive/2008/01/08/standards_2D00_microsoft.aspx#comments</comments><description>&lt;p&gt;With the new year roll out, Microsoft has initiated a new website with the caption as mentioned at the subject of this post. Yes, they are starting a new initiative with all the Standards that are in place with the industry giants and the best out of Individuals, Corporations, Acadmics, who not ... every one ..&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.microsoft.com/standards/"&gt;http://www.microsoft.com/standards/&lt;/a&gt; is the link for all such standards. The initial thought for this resulted from the Interop team. They have a separate home for them as &lt;a href="http://www.microsoft.com/interop"&gt;http://www.microsoft.com/interop&lt;/a&gt;. The history has 2 yrs old story to come out with such standards towards Interoperability. And finally they are with the standards that are in best practice with industry.&lt;/p&gt; &lt;p&gt;I just started going through one by one.. did you ??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1446116" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/Community/default.aspx">Community</category><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/First/default.aspx">First</category><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/Microsoft+Promotions/default.aspx">Microsoft Promotions</category></item><item><title>The importance of 'Return' keyword at JavaScript</title><link>http://msmvps.com/blogs/chakravarthy/archive/2007/09/15/the-importance-of-return-keyword-at-javascript.aspx</link><pubDate>Sat, 15 Sep 2007 12:26:53 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1198949</guid><dc:creator>Chakravarthy</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/chakravarthy/rsscomments.aspx?PostID=1198949</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/chakravarthy/commentapi.aspx?PostID=1198949</wfw:comment><comments>http://msmvps.com/blogs/chakravarthy/archive/2007/09/15/the-importance-of-return-keyword-at-javascript.aspx#comments</comments><description>&lt;p&gt;Recently, while coding for a Text Field value padded with left zeros, realised the importance of the RETURN key word for the FUNCTION written in JavaScript. Before i mention the actual importance, let me describe you the situation.&lt;/p&gt; &lt;p&gt;Scenario: A Text box need to be padded with zeros and should have the length of 7 digits, even the data entered is less than 7.&lt;/p&gt; &lt;p&gt;Ex: When the key board input being 88, the text box should show &lt;strong&gt;00000&lt;/strong&gt;88. Note the ZEROs padded on left.&lt;/p&gt; &lt;p&gt;So, started with a JavaScript function as mentioned below&lt;/p&gt; &lt;blockquote&gt;&lt;pre class="code"&gt;&lt;span&gt;function&lt;/span&gt; PadZeros(x)
    {
        &lt;span&gt;var&lt;/span&gt; v = x.value;
        &lt;span&gt;while&lt;/span&gt;(v.length&amp;lt;7)
        {
            v = &lt;span&gt;&amp;#39;0&amp;#39;&lt;/span&gt; + v;
        }
        &lt;span&gt;var&lt;/span&gt; ss = document.getElementById(x.id);
        ss.value = v;
    }&lt;/pre&gt;&lt;/blockquote&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;After this, the text box is padding with ZEROs and the code is perfectly running. To allow this to code execute for any given text box, all you have to do is, add the ATTRIBUTE to that text box. And while adding keep one thing in mind that, we would be calling this function on BLUR, ie., LOST FOCUS of the text box. The code is as mentioned below.&lt;/p&gt;&lt;pre class="code"&gt;            &lt;span&gt;this&lt;/span&gt;.txtPCode.Attributes.Add(&lt;span&gt;&amp;quot;onblur&amp;quot;&lt;/span&gt;, &lt;span&gt;&amp;quot;PadZeros(this);&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;Please note the &amp;#39;this&amp;#39; keyword. The usage of &amp;#39;this&amp;#39; keyword has many possibilities. Let me see that, one day will post where the &amp;#39;this&amp;#39; keyword is used and their context. And also note that, neither the function is returning any value nor the text box is added with the code that handles the output of the function. Will come to that in short.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Every thing is working perfectly well and going on smooth. But suddenly, i realised that the text box is just padding ZEROs when there is no Input. I see all ZEROs in the text box as &lt;strong&gt;0000000&lt;/strong&gt;. Then came the real trick to the function.&lt;/p&gt;
&lt;blockquote&gt;&lt;pre class="code"&gt;&lt;span&gt;function&lt;/span&gt; PadZeros(x)
    {
        &lt;span&gt;var&lt;/span&gt; v = x.value;
        &lt;span&gt;if&lt;/span&gt;(v.length == 0)
        {
            &lt;span&gt;var&lt;/span&gt; vTe = document.getElementById(x.id);
            vTe.focus();
            alert(&lt;span&gt;&amp;#39;Please enter Provider Code .. &amp;#39;&lt;/span&gt;);
        }
        &lt;span&gt;while&lt;/span&gt;(v.length&amp;lt;7)
        {
            v = &lt;span&gt;&amp;#39;0&amp;#39;&lt;/span&gt; + v;
        }
        &lt;span&gt;var&lt;/span&gt; ss = document.getElementById(x.id);
        ss.value = v;
    }&lt;/pre&gt;&lt;/blockquote&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;What do you see here is the mechanism to set the focus back to the text box. Great... but that even is not solving my purpose of leaving the text box blank when there is no input. This function is still adding ZEROs to no input and showing all ZEROs. Then came the purpose of the &lt;strong&gt;&lt;font color="#0080ff"&gt;&amp;#39;return&amp;#39;&lt;/font&gt;&lt;/strong&gt; keyword. The entire requirement is simply solved by this keyword. All i&amp;#39;ve done is.. changed the code as mentioned below.&lt;/p&gt;
&lt;blockquote&gt;&lt;pre class="code"&gt;&lt;span&gt;function&lt;/span&gt; PadZeros(x)
    {
        &lt;span&gt;var&lt;/span&gt; v = x.value;
        &lt;span&gt;if&lt;/span&gt;(v.length == 0)
        {
            &lt;span&gt;var&lt;/span&gt; vTe = document.getElementById(x.id);
            vTe.focus();
            alert(&lt;span&gt;&amp;#39;Please enter Provider Code .. &amp;#39;&lt;/span&gt;);
            &lt;span&gt;return&lt;/span&gt; &lt;span&gt;false&lt;/span&gt;;
        }
        &lt;span&gt;while&lt;/span&gt;(v.length&amp;lt;7)
        {
            v = &lt;span&gt;&amp;#39;0&amp;#39;&lt;/span&gt; + v;
        }
        &lt;span&gt;var&lt;/span&gt; ss = document.getElementById(x.id);
        ss.value = v;
        &lt;span&gt;return&lt;/span&gt; &lt;span&gt;true&lt;/span&gt;;
    }&lt;/pre&gt;&lt;/blockquote&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;At the code behind added &amp;#39;return&amp;#39; as shown here &lt;/p&gt;&lt;pre class="code"&gt;            &lt;span&gt;this&lt;/span&gt;.txtPCode.Attributes.Add(&lt;span&gt;&amp;quot;onblur&amp;quot;&lt;/span&gt;, &lt;span&gt;&amp;quot;return PadZeros(this);&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;That&amp;#39;s all.. hoollaa... What do you say ?&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a8c92c9f-3426-4b59-949b-0a4912605601" style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/JavaScript" rel="tag"&gt;JavaScript&lt;/a&gt;, &lt;a href="http://technorati.com/tags/PadZeros" rel="tag"&gt;PadZeros&lt;/a&gt;, &lt;a href="http://technorati.com/tags/return" rel="tag"&gt;return&lt;/a&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1198949" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/First/default.aspx">First</category><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/Hyderabad/default.aspx">Hyderabad</category><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/Tips/default.aspx">Tips</category><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/Code/default.aspx">Code</category><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/InteQ/default.aspx">InteQ</category><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/JavaScript/default.aspx">JavaScript</category></item><item><title>C# 3.0 - What's New : {Implicit}-Part1</title><link>http://msmvps.com/blogs/chakravarthy/archive/2007/08/24/c-3-0-what-s-new-implicit-part1.aspx</link><pubDate>Fri, 24 Aug 2007 05:33:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1134530</guid><dc:creator>Chakravarthy</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/chakravarthy/rsscomments.aspx?PostID=1134530</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/chakravarthy/commentapi.aspx?PostID=1134530</wfw:comment><comments>http://msmvps.com/blogs/chakravarthy/archive/2007/08/24/c-3-0-what-s-new-implicit-part1.aspx#comments</comments><description>&lt;p&gt;Recent development in my technical life is that, started working out with Orcas Beta 2. So, thought to blog about the latest happenings with C# language. The idea emerged to start a series of posts related to C# new features. This is the first of ever such kind of blogging specific to a topic. 
&lt;p&gt;C# 3.0 has many-a-new features. To start with, let me take a concept of &lt;b&gt;Implicitly Typed Variables&lt;/b&gt;. 
&lt;p&gt;&lt;b&gt;Implicitly Typed Variables&lt;/b&gt; 
&lt;p&gt;In the good old days, the developer has to worry about the type of the variable. Say for instance, whether to use long or double for a counter. Here&amp;nbsp;all that we observe&amp;nbsp;is that the language that is&amp;nbsp;built upon is the type specific.&amp;nbsp;Hence forth the developer is not required to define the type of the variable at the time of declaration, but it is the task of the compiler to decide what type of the object the variable is. All that the developer has to do is that, use the &lt;b&gt;var&lt;/b&gt; keyword while declaring the variable, similar to that of JScript or Visual Basic style. Hey!!! Stop!!!!! don&amp;#39;t get confuse with the type of &lt;strong&gt;VAR&lt;/strong&gt; variables declared at&amp;nbsp;JScript or Visual basic.&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s first discuss the difference between VAR variables at JScript and VAR variables of C#&lt;/p&gt;
&lt;table class="" cellspacing="0" cellpadding="2"&gt;

&lt;tr&gt;
&lt;td class="" align="middle"&gt;&lt;font size="2"&gt;VAR JScript&lt;/font&gt;&lt;/td&gt;
&lt;td class="" align="middle"&gt;&lt;font size="2"&gt;VAR C#&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;&lt;font size="2"&gt;This is of no type&lt;/font&gt;&lt;/td&gt;
&lt;td class=""&gt;&lt;font size="2"&gt;The type of the variable is defined by the value declared and decided at the compile time&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;&lt;font size="2"&gt;Technically have no type. Can consider of limited types, namely, string literal, numeric, boolean &lt;/font&gt;&lt;/td&gt;
&lt;td class=""&gt;Type agnostic, have specific predefined formats&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;&lt;font size="2"&gt;Type conversion is coercion&lt;/font&gt;&lt;/td&gt;
&lt;td class=""&gt;&lt;font size="2"&gt;Type casting is simple and handled by CLR&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;&lt;font size="2"&gt;No mechanism for parsing&lt;/font&gt;&lt;/td&gt;
&lt;td class=""&gt;&lt;font size="2"&gt;explicit functions for parsing to specific type&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;p&gt;Now, let us see the difference between the language specific VAR of VisualBasic 6.0&amp;nbsp;and C# 3.0&lt;/p&gt;
&lt;table class="" cellspacing="0" cellpadding="2"&gt;

&lt;tr&gt;
&lt;td class="" align="middle"&gt;&lt;font size="2"&gt;VAR in VB (but not .NET)&lt;/font&gt;&lt;/td&gt;
&lt;td class="" align="middle"&gt;&lt;font size="2"&gt;VAR in C# 3.0&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;&lt;font size="2"&gt;By definition, these are Variant &lt;/font&gt;&lt;/td&gt;
&lt;td class=""&gt;&lt;font size="2"&gt;Type of the variable is defined at the compile time&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;&lt;font size="2"&gt;Could be any allowed type from with in the known types of the language&lt;/font&gt;&lt;/td&gt;
&lt;td class=""&gt;&lt;font size="2"&gt;Type is decided by the value associated with the variable&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;&lt;font size="2"&gt;Largest among all the known&amp;nbsp;data tydpes&lt;/font&gt;&lt;/td&gt;
&lt;td class=""&gt;&lt;font size="2"&gt;Size depends on the type of the&amp;nbsp;value initialised&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;p&gt;To summarize, the variables declared in C# 3.0 are type specific, &lt;strong&gt;thou&lt;/strong&gt; used the key word &lt;strong&gt;VAR&lt;/strong&gt;, during the declaration. Thus, we can conclude that the compiler is the responsible point to decide the type of the variable. Hence we can say with&amp;nbsp;comfort that, the variables from C# 3.0 are &lt;strong&gt;Implicitly Typed&lt;/strong&gt; variables. &lt;/p&gt;
&lt;p&gt;Some examples as mentioned below.&lt;/p&gt;&lt;pre class="code"&gt;            &lt;span&gt;var&lt;/span&gt; vIntVal = 10; &lt;span&gt;// This will be the System.Int32 type
&lt;/span&gt;            &lt;span&gt;var&lt;/span&gt; vLongVal = 10000000000; &lt;span&gt;// This will be the System.Int64 type
&lt;/span&gt;            &lt;span&gt;var&lt;/span&gt; vDoubleVal = 10.0; &lt;span&gt;// This will be the System.Double type
&lt;/span&gt;            &lt;span&gt;var&lt;/span&gt; vFloatVal = 10.0f; &lt;span&gt;// This will be the System.Single type
&lt;/span&gt;            &lt;span&gt;float&lt;/span&gt; vFlVal = 10.0f; &lt;span&gt;// Thou defined using float key word, but inherits from Struct System.Single 
&lt;/span&gt;            &lt;span&gt;var&lt;/span&gt; vStrVal = &lt;span&gt;&amp;quot;String Value &amp;quot;&lt;/span&gt;;  &lt;span&gt;// This will be the System.String type
&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;So, from the above declarations, it is pretty clear that the variable is defined by the value associated during the declaration. The type is not just limited to the kind of data types as explained above, but you can extend this to any type of the variable that you use while writing code for iterations, similar such as &lt;strong&gt;&lt;font color="#0000ff"&gt;foreach&lt;/font&gt;&lt;/strong&gt;. Below is the example for other known types.&lt;/p&gt;&lt;pre class="code"&gt;            &lt;span&gt;foreach&lt;/span&gt; (&lt;span&gt;var&lt;/span&gt; vTable &lt;span&gt;in&lt;/span&gt; ds.Tables) &lt;span&gt;// Implicitly declared a variable of Data Table Type
&lt;/span&gt;            {
                &lt;span&gt;foreach&lt;/span&gt; (&lt;span&gt;var&lt;/span&gt; vRow &lt;span&gt;in&lt;/span&gt; ((&lt;span&gt;DataTable&lt;/span&gt;) vTable).Rows) &lt;span&gt;// Implicit declaration of DataRow variable
&lt;/span&gt;                {

                }
            }
&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;By using such, one can extend any extent. The limit is the imagination of the developer. What do you say?&lt;/p&gt;
&lt;p&gt;Source: &lt;/p&gt;
&lt;p&gt;1) &lt;a title="http://cobdev.cob.isu.edu/psb/jscript/306.htm" href="http://cobdev.cob.isu.edu/psb/jscript/306.htm"&gt;http://cobdev.cob.isu.edu/psb/jscript/306.htm&lt;/a&gt;&amp;nbsp;for JScript&lt;br /&gt;2) &lt;a title="http://www.1sayfa.com/1024/diger/vb/ch07.htm" href="http://www.1sayfa.com/1024/diger/vb/ch07.htm"&gt;http://www.1sayfa.com/1024/diger/vb/ch07.htm&lt;/a&gt;&amp;nbsp;for Visual Basic 6.0 Datatypes&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:80c6bbbe-a3e3-4b04-813c-476e8089f26c" style="PADDING-RIGHT:0px;DISPLAY:inline;PADDING-LEFT:0px;PADDING-BOTTOM:0px;MARGIN:0px;PADDING-TOP:0px;"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/CSharp" rel="tag"&gt;CSharp&lt;/a&gt;, &lt;a href="http://del.icio.us/popular/3.0" rel="tag"&gt;3.0&lt;/a&gt;, &lt;a href="http://del.icio.us/popular/Code" rel="tag"&gt;Code&lt;/a&gt;, &lt;a href="http://del.icio.us/popular/Tips" rel="tag"&gt;Tips&lt;/a&gt;, &lt;a href="http://del.icio.us/popular/Implicit" rel="tag"&gt;Implicit&lt;/a&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1134530" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/C_2300_+3.0/default.aspx">C# 3.0</category><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/Definition/default.aspx">Definition</category><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/First/default.aspx">First</category><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/Tips/default.aspx">Tips</category><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/Code/default.aspx">Code</category></item><item><title>Tafiti Search Engine from Microsoft</title><link>http://msmvps.com/blogs/chakravarthy/archive/2007/08/24/tafiti-search-engine-from-microsoft.aspx</link><pubDate>Fri, 24 Aug 2007 03:10:10 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1134407</guid><dc:creator>Chakravarthy</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/chakravarthy/rsscomments.aspx?PostID=1134407</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/chakravarthy/commentapi.aspx?PostID=1134407</wfw:comment><comments>http://msmvps.com/blogs/chakravarthy/archive/2007/08/24/tafiti-search-engine-from-microsoft.aspx#comments</comments><description>&lt;p&gt;Tafiti, which means &amp;quot;do research&amp;quot; in Swahili, is an experimental search front-end from Microsoft, designed to help people use the Web for research projects that span multiple search queries and sessions by helping visualize, store, and share research results. Tafiti uses both Microsoft Silverlight and Live Search to explore the intersection of richer experiences on the Web and the increasing specialization of search. &lt;/p&gt; &lt;table cellspacing="0" cellpadding="2"&gt;  &lt;tr&gt; &lt;td&gt;&lt;a href="http://msmvps.com/blogs/chakravarthy/WindowsLiveWriter/TafitiSearchEnginefromMicrosoft_12192/image_1.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="166" alt="image" src="http://msmvps.com/blogs/chakravarthy/WindowsLiveWriter/TafitiSearchEnginefromMicrosoft_12192/image_thumb_1.png" width="240" border="0" /&gt;&lt;/a&gt; &lt;/td&gt; &lt;td&gt;My experience with Tafiti is awesome. It is a great visual treat. The features as of now I found to be great is the type specific.&lt;br /&gt;&lt;br /&gt;In other words, as you could see here when you search for any topic, you could filter them specific to the icon displayed here. You could filter the RSS feeds, Blogs, Images, News, as of now. Probably, they would come out with lot more.&lt;br /&gt;&lt;br /&gt;All these days am a die-hard fan of godark.us due to the search in black for google, not any more. Secondly, am not sure about the content relevance percentage of the search. Time will prove the statistics.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;p align="right"&gt;&lt;a href="http://msmvps.com/blogs/chakravarthy/WindowsLiveWriter/TafitiSearchEnginefromMicrosoft_12192/image_2.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="240" alt="image" src="http://msmvps.com/blogs/chakravarthy/WindowsLiveWriter/TafitiSearchEnginefromMicrosoft_12192/image_thumb_2.png" width="122" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/td&gt; &lt;td&gt;Apart of that it also has the mechanism to save the search onto the right side of the visible area.&lt;br /&gt;&lt;br /&gt;So that you don&amp;#39;t require remember for a specific search.&lt;br /&gt;&lt;br /&gt;True that, it installs the Silverlight component. But silver light is going to be the future for streaming videos on web.&lt;br /&gt;&lt;br /&gt;And one more thing, can I consider this as stack of my searches????&lt;br /&gt;&lt;br /&gt;What do you say?&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; &lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:1e5a1a97-52de-4695-8ded-04786a2b8c9a" style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/SilverLight" rel="tag"&gt;SilverLight&lt;/a&gt;, &lt;a href="http://del.icio.us/popular/Tafiti" rel="tag"&gt;Tafiti&lt;/a&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1134407" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/First/default.aspx">First</category></item><item><title>Runtime Polymorphism</title><link>http://msmvps.com/blogs/chakravarthy/archive/2007/08/20/runtime-polymorphism.aspx</link><pubDate>Mon, 20 Aug 2007 11:00:50 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1125966</guid><dc:creator>Chakravarthy</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/chakravarthy/rsscomments.aspx?PostID=1125966</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/chakravarthy/commentapi.aspx?PostID=1125966</wfw:comment><comments>http://msmvps.com/blogs/chakravarthy/archive/2007/08/20/runtime-polymorphism.aspx#comments</comments><description>&lt;p style="margin-bottom:0.19in;"&gt;&lt;span style="color:#111111;"&gt;One of the frequently seen situations from a technical standpoint in a large scale of Business Layer objects is, invoking methods from different objects when they contain same method name. Today, am going to make it simple to give an example for Runtime Polymorphism. Leave your comments if am mistaken&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;At this stage, I don’t think to mention about &amp;quot;Polymorphism&amp;quot;, as hope that you are aware of how polymorphic behavior can be fused using C#. If you want a start up, in simple words, implementation of one Method with many definitions, as mentioned below.&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; &lt;span style="color:#008080;"&gt;Employee&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="font-size:85%;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#808080;"&gt;///&lt;/span&gt;&lt;span style="color:#008000;"&gt; &lt;/span&gt;&lt;span style="color:#808080;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#808080;"&gt;///&lt;/span&gt;&lt;span style="color:#008000;"&gt; Invoked for the Regular salaried employes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#808080;"&gt;///&lt;/span&gt;&lt;span style="color:#008000;"&gt; &lt;/span&gt;&lt;span style="color:#808080;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#808080;"&gt;///&lt;/span&gt;&lt;span style="color:#008000;"&gt; &lt;/span&gt;&lt;span style="color:#808080;"&gt;&amp;lt;param name=&amp;quot;intEmpId&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color:#008000;"&gt;Employee ID&lt;/span&gt;&lt;span style="color:#808080;"&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#808080;"&gt;///&lt;/span&gt;&lt;span style="color:#008000;"&gt; &lt;/span&gt;&lt;span style="color:#808080;"&gt;&amp;lt;param name=&amp;quot;intAbscentDays&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color:#008000;"&gt;Number of days&lt;/span&gt;&lt;span style="color:#808080;"&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#808080;"&gt;///&lt;/span&gt;&lt;span style="color:#008000;"&gt; &lt;/span&gt;&lt;span style="color:#808080;"&gt;&amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#0000ff;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom:0.19in;"&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;long&lt;/span&gt; CalculateSal(&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; intEmpId, &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; intAbscentDays)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="font-size:85%;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; (GetEmpSal(intEmpId) * (GetWorkingDays(&lt;span style="color:#008080;"&gt;DateTime&lt;/span&gt;.Now.Month) - intAbscentDays));&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="font-size:85%;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#808080;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom:0.19in;"&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#808080;"&gt;///&lt;/span&gt;&lt;span style="color:#008000;"&gt; &lt;/span&gt;&lt;span style="color:#808080;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;/p&gt; &lt;p style="margin-bottom:0.19in;"&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#808080;"&gt;///&lt;/span&gt;&lt;span style="color:#008000;"&gt; Invoked for the employees, who work as Daily wage&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#808080;"&gt;///&lt;/span&gt;&lt;span style="color:#008000;"&gt; &lt;/span&gt;&lt;span style="color:#808080;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#808080;"&gt;///&lt;/span&gt;&lt;span style="color:#008000;"&gt; &lt;/span&gt;&lt;span style="color:#808080;"&gt;&amp;lt;param name=&amp;quot;lSalPerDay&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color:#008000;"&gt;Salary per day&lt;/span&gt;&lt;span style="color:#808080;"&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#808080;"&gt;///&lt;/span&gt;&lt;span style="color:#008000;"&gt; &lt;/span&gt;&lt;span style="color:#808080;"&gt;&amp;lt;param name=&amp;quot;intDays&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color:#008000;"&gt;For number of days&lt;/span&gt;&lt;span style="color:#808080;"&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#808080;"&gt;///&lt;/span&gt;&lt;span style="color:#008000;"&gt; &lt;/span&gt;&lt;span style="color:#808080;"&gt;&amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;long&lt;/span&gt; CalculateSal(&lt;span style="color:#0000ff;"&gt;long&lt;/span&gt; lSalPerDay, &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; intDays)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="font-size:85%;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; lSalPerDay * intDays;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="font-size:85%;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="font-size:85%;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom:0.19in;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="font-size:85%;"&gt;A simple way of invoking is as mentioned below.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#008080;"&gt;Employee&lt;/span&gt; eTe = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#008080;"&gt;Employee&lt;/span&gt;();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#0000ff;"&gt;long&lt;/span&gt; lSal = eTe.CalculateSal(124, 2);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="color:#0000ff;"&gt;long&lt;/span&gt; lSal = eTe.CalculateSal(678.35, 18);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;/p&gt; &lt;p style="margin-bottom:0.19in;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="font-size:85%;"&gt;So, by now, you are clear how to write polymorphic method and as well as how to use. Let’s jump to how you can make the Runtime Polymorphism.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom:0.19in;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="font-size:85%;"&gt;To continue the discussion, first we need to know that there are 2 basic&amp;nbsp;types of polymorphism. They are, Overloading, referred as Compile time polymorphism, and Overriding also called as Run-Time polymorphism. What you have seen above is the first kind of polymorphism. The second type is referred as late binding. In other words, &lt;strong&gt;&lt;font face="gar" color="#000080"&gt;the selection of the method for execution at runtime depends on the reference of the actual&amp;nbsp;object that is triggering the invoking of the method&lt;/font&gt;&lt;/strong&gt;. Now let&amp;#39;s explore that with some example.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom:0.19in;"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="font-size:85%;"&gt;Let us take a small class, as mentioned below&amp;nbsp;with few properties. This class acts as a base class for us.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom:0.19in;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span&gt;public&lt;/span&gt; &lt;span&gt;class&lt;/span&gt; &lt;span&gt;EmpNames&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span&gt;public&lt;/span&gt; &lt;span&gt;string&lt;/span&gt; FirstName { &lt;span&gt;get&lt;/span&gt;; &lt;span&gt;set&lt;/span&gt;; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span&gt;public&lt;/span&gt; &lt;span&gt;string&lt;/span&gt; MiddleName { &lt;span&gt;get&lt;/span&gt;; &lt;span&gt;set&lt;/span&gt;; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span&gt;public&lt;/span&gt; &lt;span&gt;string&lt;/span&gt; LastName { &lt;span&gt;get&lt;/span&gt;; &lt;span&gt;set&lt;/span&gt;; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="font-size:85%;"&gt;We will now inherit this into the following classes. Observe that the both classes doesn&amp;#39;t have any direct relation with each other and can be instantiated as is.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class="code"&gt;    &lt;span&gt;///&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;summary&amp;gt;
&lt;/span&gt;    &lt;span&gt;///&lt;/span&gt;&lt;span&gt; This class calculate the wages for given number of days
&lt;/span&gt;    &lt;span&gt;///&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;/summary&amp;gt;
&lt;/span&gt;    &lt;span&gt;public&lt;/span&gt; &lt;span&gt;class&lt;/span&gt; &lt;span&gt;Wages&lt;/span&gt; : &lt;span&gt;EmpNames&lt;/span&gt; 
    {
        &lt;span&gt;///&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;summary&amp;gt;
&lt;/span&gt;        &lt;span&gt;///&lt;/span&gt;&lt;span&gt; This will calculate the wages for the employees
&lt;/span&gt;        &lt;span&gt;///&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;/summary&amp;gt;
&lt;/span&gt;        &lt;span&gt;///&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;param name=&amp;quot;Params&amp;quot;&amp;gt;&lt;/span&gt;&lt;span&gt;Wage per Day, Number of Working days in a month&lt;/span&gt;&lt;span&gt;&amp;lt;/param&amp;gt;
&lt;/span&gt;        &lt;span&gt;///&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;returns&amp;gt;&lt;/span&gt;&lt;span&gt; WagePerDay * WorkingDays &lt;/span&gt;&lt;span&gt;&amp;lt;/returns&amp;gt;
&lt;/span&gt;        &lt;span&gt;public&lt;/span&gt; &lt;span&gt;double&lt;/span&gt; CalculateSalary(&lt;span&gt;ArrayList&lt;/span&gt; Params)
        {
            &lt;span&gt;return&lt;/span&gt; &lt;span&gt;double&lt;/span&gt;.Parse(Params[0].ToString()) * &lt;span&gt;int&lt;/span&gt;.Parse(Params[1].ToString());
        }
    }


    &lt;span&gt;///&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;summary&amp;gt;
&lt;/span&gt;    &lt;span&gt;///&lt;/span&gt;&lt;span&gt; This class will calculate the salary
&lt;/span&gt;    &lt;span&gt;///&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;/summary&amp;gt;
&lt;/span&gt;    &lt;span&gt;public&lt;/span&gt; &lt;span&gt;class&lt;/span&gt; &lt;span&gt;Salried&lt;/span&gt; : &lt;span&gt;EmpNames
&lt;/span&gt;    {
        &lt;span&gt;///&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;summary&amp;gt;
&lt;/span&gt;        &lt;span&gt;///&lt;/span&gt;&lt;span&gt; This will calculate the salary for the employees
&lt;/span&gt;        &lt;span&gt;///&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;/summary&amp;gt;
&lt;/span&gt;        &lt;span&gt;///&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;param name=&amp;quot;Params&amp;quot;&amp;gt;&lt;/span&gt;&lt;span&gt;Working days Per Month, Leaves, Salary Per Month&lt;/span&gt;&lt;span&gt;&amp;lt;/param&amp;gt;
&lt;/span&gt;        &lt;span&gt;///&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;returns&amp;gt;&lt;/span&gt;&lt;span&gt; Full Salary in case no value for Leaves. Other case, (SalaryPerMonth/WorkingDays) * (WorkingDays - Leaves) &lt;/span&gt;&lt;span&gt;&amp;lt;/returns&amp;gt;
&lt;/span&gt;        &lt;span&gt;public&lt;/span&gt; &lt;span&gt;double&lt;/span&gt; CalculateSalary(&lt;span&gt;ArrayList&lt;/span&gt; Params)
        {
            &lt;span&gt;double&lt;/span&gt; dSal=&lt;span&gt;double&lt;/span&gt;.Parse(Params[2].ToString());
            &lt;span&gt;int&lt;/span&gt; intLeaves = &lt;span&gt;int&lt;/span&gt;.Parse(Params[1].ToString());
            &lt;span&gt;if&lt;/span&gt; (!intLeaves.Equals(0))
            {
                &lt;span&gt;int&lt;/span&gt; intWrkDays = &lt;span&gt;int&lt;/span&gt;.Parse(Params[0].ToString());
                dSal = (dSal / intWrkDays) * (intWrkDays - intLeaves);
            }
            &lt;span&gt;return&lt;/span&gt; dSal;
        }
    }&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="font-size:85%;"&gt;Now that we have these two classes, We can write our code to instantiate them as individual. But the point of this post is to describe the &amp;quot;RunTime Polymorphism&amp;quot;. Before we go further, note that, each class has the method &amp;quot;&lt;strong&gt;&lt;font color="#0000ff"&gt;CalculateSalary&lt;/font&gt;&lt;/strong&gt;&amp;quot; and as they are not directly related, you can instantiate them with out any hassle.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class="code"&gt;            &lt;span&gt;EmpNames&lt;/span&gt; empObj;&lt;/pre&gt;&lt;pre class="code"&gt;            &lt;span&gt;ArrayList&lt;/span&gt; alValues = &lt;span&gt;new&lt;/span&gt; &lt;span&gt;ArrayList&lt;/span&gt;();
            alValues.Add(30); &lt;span&gt;//Just add all the fields as this&lt;/span&gt;&lt;/pre&gt;&lt;pre class="code"&gt;            &lt;span&gt;bool&lt;/span&gt; bSalaried = &lt;span&gt;true&lt;/span&gt;; &lt;span&gt;//am using this variable for validation of emp&lt;/span&gt;

            &lt;span&gt;if&lt;/span&gt; (bSalaried) &lt;span&gt;//Validating whether Salaried or Wages &lt;/span&gt;
                empObj = &lt;span&gt;new&lt;/span&gt; &lt;span&gt;Salried&lt;/span&gt;();
            &lt;span&gt;else
&lt;/span&gt;                empObj = &lt;span&gt;new&lt;/span&gt; &lt;span&gt;Wages&lt;/span&gt;();&lt;/pre&gt;&lt;pre class="code"&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="font-size:85%;"&gt;After executing the above lines of code, you are sure about the type of the variable empObj. This is Runtime initiating the object. But this is not the purpose of our current topic.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="code"&gt;            &lt;span&gt;double&lt;/span&gt; dVal;

            &lt;span&gt;//The below line will throw compile time error
&lt;/span&gt;            &lt;span&gt;//dVal = empObj.CalculateSalary(alValues);
&lt;/span&gt;            dVal = ((&lt;span&gt;Wages&lt;/span&gt;) empObj).CalculateSalary(alValues);
&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new, monospace;"&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Courier New"&gt;What do you see from the last line of the above code? Did you find that the method invoked is from a class type. Now, think that, what if the class is being instantiated as Salaried and the last line is being invoked?&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;This is called as RunTime Polymorphism.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:31e4289c-ec2b-438f-9f1d-d9e421aa3246" style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/Runtime%20Polymorphism" rel="tag"&gt;Runtime Polymorphism&lt;/a&gt;, &lt;a href="http://del.icio.us/popular/CSharp" rel="tag"&gt;CSharp&lt;/a&gt;, &lt;a href="http://del.icio.us/popular/Tips" rel="tag"&gt;Tips&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p style="margin-bottom:0.19in;"&gt;&lt;br /&gt;-----------------------&lt;br /&gt;&amp;nbsp;Declaimer: What ever you read here is out of my own experience. No one shall be made responsible for the contents and issues that are mentioned here. If you have something to share in person on this post, pl drop me a mail at dskcheck@gmail.com with the title in the subject.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1125966" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/C_2300_+3.0/default.aspx">C# 3.0</category><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/First/default.aspx">First</category><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/RunTime+Polymorphsim/default.aspx">RunTime Polymorphsim</category><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/Tips/default.aspx">Tips</category><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/Code/default.aspx">Code</category></item><item><title>PaaS or SaaS</title><link>http://msmvps.com/blogs/chakravarthy/archive/2007/07/26/paas-or-saas.aspx</link><pubDate>Thu, 26 Jul 2007 12:37:52 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1058897</guid><dc:creator>Chakravarthy</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/chakravarthy/rsscomments.aspx?PostID=1058897</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/chakravarthy/commentapi.aspx?PostID=1058897</wfw:comment><comments>http://msmvps.com/blogs/chakravarthy/archive/2007/07/26/paas-or-saas.aspx#comments</comments><description>&lt;p&gt;There is a big debate going on with these two buzz words. Before we get to the point of this post, let&amp;#39;s first examine what they are... and what they mean by to the development force.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;SaaS&lt;/strong&gt; : By definition it goes like this, Software As A Service. In the good olden days, we are used to think the application as whole system and all the modules have to function only with in. But as the technology evolved and the new horizons are leading the development process to newer levels, we got a new dimension as &amp;quot;Web Service&amp;quot;. This concept then further raise the functionality&amp;nbsp;of the individual modules&amp;nbsp;belonging to&amp;nbsp;the big application turn&amp;nbsp;into smaller parts of reusable components by other applications as well. Resulting the module as a service altogether for any and every consumer application.&lt;/p&gt; &lt;p&gt;This left the architects to view their application in smaller, exportable as well as consumable by different vendors or applications. This led to the concept of designing every application to foresee the reusability and come up with a kind of an architecture, so that every module inside the application is targeted as service. Hence the concept of &amp;quot;Software as a Service&amp;quot;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;PaaS&lt;/strong&gt; : By definition it goes like this,&amp;nbsp;Platform As A Service. In the recent&amp;nbsp;days, the paradigm of application switched over from an individual&amp;nbsp;point of&amp;nbsp;a specialized vertical to the combination&amp;nbsp;with the external functionality as well.&amp;nbsp;As mentioned above, the applications started consuming the Services from external world and expanding their domain functionality. The industry is not just satisfied there with. &lt;/p&gt; &lt;p&gt;Some thing more wanted and flexibility with in the application brought the idea of &amp;quot;Platform neutral&amp;quot; into limelight. Resulting that the application concept attain the new veneer. The architects started visualizing the need&amp;nbsp;for the application&amp;nbsp;platform, as a&amp;nbsp;whole,&amp;nbsp;to be flexible enough to work as a service. Leading to the new scope of web availability to every anonymous user.&lt;/p&gt; &lt;p&gt;-------------------------------------------&lt;/p&gt; &lt;p&gt;This is my first post that ever&amp;nbsp;made me to think very deeply and came out of my&amp;nbsp;own words... How is this ?&amp;nbsp;&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:7074559e-ee89-4c24-a4aa-f309fb6bebc1" style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/SaaS" rel="tag"&gt;SaaS&lt;/a&gt;, &lt;a href="http://del.icio.us/popular/paaS" rel="tag"&gt;paaS&lt;/a&gt;&lt;/div&gt; &lt;p&gt;&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:2e1df5d7-8fe4-440c-b8fc-6b55a0c50154" style="padding-right:0px;display:inline;padding-left:0px;float:none;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/PaaS" rel="tag"&gt;PaaS&lt;/a&gt;, &lt;a href="http://technorati.com/tags/SaaS" rel="tag"&gt;SaaS&lt;/a&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1058897" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/Definition/default.aspx">Definition</category><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/PaaS/default.aspx">PaaS</category><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/SaaS/default.aspx">SaaS</category><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/First/default.aspx">First</category></item><item><title>Posting from Live writer</title><link>http://msmvps.com/blogs/chakravarthy/archive/2007/06/21/posting-from-live-writer.aspx</link><pubDate>Thu, 21 Jun 2007 07:45:37 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:977879</guid><dc:creator>Chakravarthy</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/chakravarthy/rsscomments.aspx?PostID=977879</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/chakravarthy/commentapi.aspx?PostID=977879</wfw:comment><comments>http://msmvps.com/blogs/chakravarthy/archive/2007/06/21/posting-from-live-writer.aspx#comments</comments><description>&lt;p&gt;This is my first post from Live Writer Version 1.0. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=977879" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/BloggingClientTool/default.aspx">BloggingClientTool</category><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/First/default.aspx">First</category></item><item><title>My first Post</title><link>http://msmvps.com/blogs/chakravarthy/archive/2006/05/19/my-first-post.aspx</link><pubDate>Fri, 19 May 2006 12:57:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:95949</guid><dc:creator>Chakravarthy</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/chakravarthy/rsscomments.aspx?PostID=95949</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/chakravarthy/commentapi.aspx?PostID=95949</wfw:comment><comments>http://msmvps.com/blogs/chakravarthy/archive/2006/05/19/my-first-post.aspx#comments</comments><description>&lt;p&gt;Today, i&amp;#39;m going to talk about &amp;quot;XML DOM functionality in .NET applications&amp;quot; for the first time at &lt;a href="http://groups.msn.com/bdotnet"&gt;B.NET&lt;/a&gt; offline meeting. Inspired by &lt;a href="http://www.mcwtech.com/2004/webcasts/"&gt;Ken Getz &lt;/a&gt;talking about the same such, decided to talk with B.NET offline meeting and mentioned that all&amp;nbsp;credit goes to Ken. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=95949" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/chakravarthy/archive/tags/First/default.aspx">First</category></item></channel></rss>