<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>TOURNEY LOGIC LINK BLOG</title><link>http://www.tourneylogic.com/Blogs/links/</link><description /><managingEditor>Tourney Logic</managingEditor><dc:language>en-US</dc:language><generator>.Text Version 0.95.2004.102</generator><item><dc:creator>Tourney Logic</dc:creator><title>Polymorphism Defined (from: Raymond Lewallen)</title><link>http://www.tourneylogic.com/Blogs/links/archive/2005/03/16/450.aspx</link><pubDate>Wed, 16 Mar 2005 20:26:00 GMT</pubDate><guid>http://www.tourneylogic.com/Blogs/links/archive/2005/03/16/450.aspx</guid><description>&lt;div&gt;&lt;link href="c:\progra~1\newsga~1\ngstyles.css" type="text/css" rel="stylesheet" /&gt;&lt;p&gt;Finally, the final of the 4 posts on object-oriented principles forthose of you just coming to .Net from non-OOP languages.&amp;nbsp; &lt;A href="http://codebetter.com/blogs/raymond.lewallen/archive/2005/02/17/51092.aspx" title="http://codebetter.com/blogs/raymond.lewallen/archive/2005/02/17/51092.aspx"&gt;Data Abstraction&lt;/a&gt;, &lt;A href="http://codebetter.com/blogs/raymond.lewallen/archive/2005/02/10/50775.aspx" title="http://codebetter.com/blogs/raymond.lewallen/archive/2005/02/10/50775.aspx"&gt;Encapsulation&lt;/a&gt; and &lt;A href="http://codebetter.com/blogs/raymond.lewallen/archive/2005/02/24/55941.aspx" title="http://codebetter.com/blogs/raymond.lewallen/archive/2005/02/24/55941.aspx"&gt;Inheritance&lt;/a&gt; we have already discussed.&amp;nbsp; Now we will talk about polymorphism.&lt;/p&gt;&lt;p&gt;Polymorphism means &lt;em&gt;one name, many forms&lt;/em&gt;.&amp;nbsp; Polymorphismmanifests itself by having multiple methods all with the same name, butslighty different functionality.&amp;nbsp; &lt;b&gt;&lt;i&gt;Updated statement: &lt;/i&gt;&lt;/b&gt;Polymorphism &lt;i&gt;&lt;b&gt;can be&lt;/b&gt;&lt;/i&gt;coupled with inheritance, but inheritance is not a requirement to gainpolymorphic behaviors.&amp;nbsp; Because of this, it can be difficult tofully grasp the full potential of polymorphism until you get somepractice with it and see exactly what happens under differentscenarios.&amp;nbsp; We’re&amp;nbsp;only going to talk about polymorphism, likethe other topics, at the basic level.&amp;nbsp;&lt;/p&gt;&lt;p&gt;There are 2 basic types of polymorphism.&amp;nbsp; Overridding, alsocalled run-time polymorphism, and overloading, which is referred to ascompile-time polymorphism.&amp;nbsp;&amp;nbsp;This difference is, for methodoverloading, the compiler determines which method&amp;nbsp;will beexecuted, and this decision is made when the&amp;nbsp;code gets compiled.Which method will be used for method overriding is determined atruntime based on the dynamic type of an object.&lt;/p&gt;&lt;p&gt;Let’s look at some code:&lt;/p&gt;&lt;div style="border: 1pt solid windowtext; padding: 0pt; background: white none repeat scroll 0% 50%; font-size: 8pt; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; color: black; font-family: Courier New;"&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: green; font-family: Arial;"&gt;' Base class for library assets&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;Public&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt; &lt;span style="color: blue;"&gt;MustInherit&lt;/span&gt; &lt;span style="color: blue;"&gt;Class&lt;/span&gt; LibraryAsset&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green;"&gt;' Default fine per day for overdue items&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Private&lt;/span&gt; &lt;span style="color: blue;"&gt;Const&lt;/span&gt; _finePerDay &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;Double&lt;/span&gt; = 1.25&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green;"&gt;' Due date for an item that has been checked out&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Private&lt;/span&gt; _dueDate &lt;span style="color: blue;"&gt;As&lt;/span&gt; DateTime&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Public&lt;/span&gt; &lt;span style="color: blue;"&gt;Property&lt;/span&gt; DueDate() &lt;span style="color: blue;"&gt;As&lt;/span&gt; DateTime&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Get&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Return&lt;/span&gt; _dueDate&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&gt;Get&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Set&lt;/span&gt;(&lt;span style="color: blue;"&gt;ByVal&lt;/span&gt; Value &lt;span style="color: blue;"&gt;As&lt;/span&gt; DateTime)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;_dueDate = Value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&gt;Set&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&gt;Property&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green;"&gt;' Calculates the default fine amount for an overdue item&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Public&lt;/span&gt; &lt;span style="color: blue;"&gt;Overridable&lt;/span&gt; &lt;span style="color: blue;"&gt;Function&lt;/span&gt; CalculateFineTotal() &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;Double&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; daysOverdue &lt;span style="color: blue;"&gt;As&lt;/span&gt; Int32 = CalculateDaysOverdue()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;If&lt;/span&gt; daysOverdue &amp;gt; 0 &lt;span style="color: blue;"&gt;Then&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Return&lt;/span&gt; daysOverdue * _finePerDay&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Return&lt;/span&gt; 0.0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&gt;If&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&gt;Function&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green;"&gt;' Calculates how many days overdue for an item being returned&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Protected&lt;/span&gt; &lt;span style="color: blue;"&gt;Function&lt;/span&gt; CalculateDaysOverdue() &lt;span style="color: blue;"&gt;As&lt;/span&gt; Int32&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Return&lt;/span&gt; DateDiff(DateInterval.Day, _dueDate, DateTime.Now())&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&gt;Function&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;End&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt; &lt;span style="color: blue;"&gt;Class&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: green; font-family: Arial;"&gt;' Magazine class that inherits LibraryAsset&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;Public&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt; &lt;span style="color: blue;"&gt;NotInheritable&lt;/span&gt; &lt;span style="color: blue;"&gt;Class&lt;/span&gt; Magazine&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Inherits&lt;/span&gt; LibraryAsset&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;End&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt; &lt;span style="color: blue;"&gt;Class&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: green; font-family: Arial;"&gt;' Book class that inherits LibraryAsset&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;Public&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt; &lt;span style="color: blue;"&gt;NotInheritable&lt;/span&gt; &lt;span style="color: blue;"&gt;Class&lt;/span&gt; Book&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Inherits&lt;/span&gt; LibraryAsset&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green;"&gt;' This is morphing the CalculateFineTotal() function of the base class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green;"&gt;' This function overrides the base class function, and any call&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green;"&gt;'&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;to CalculateFineTotal from any instantiated Book class will&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green;"&gt;'&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;use this function, not the base class function.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green;"&gt;' This type of polymorphism is called overriding.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Public&lt;/span&gt; &lt;span style="color: blue;"&gt;Overrides&lt;/span&gt; &lt;span style="color: blue;"&gt;Function&lt;/span&gt; CalculateFineTotal() &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;Double&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; daysOverdue &lt;span style="color: blue;"&gt;As&lt;/span&gt; Int32 = CalculateDaysOverdue()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;If&lt;/span&gt; daysOverdue &amp;gt; 0 &lt;span style="color: blue;"&gt;Then&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Return&lt;/span&gt; daysOverdue * 0.75&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Return&lt;/span&gt; 0.0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&gt;If&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&gt;Function&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;End&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt; &lt;span style="color: blue;"&gt;Class&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: green; font-family: Arial;"&gt;' AudioCassette class that inherits LibraryAsset&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;Public&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt; &lt;span style="color: blue;"&gt;NotInheritable&lt;/span&gt; &lt;span style="color: blue;"&gt;Class&lt;/span&gt; AudioCassette&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Inherits&lt;/span&gt; LibraryAsset&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green;"&gt;' This is morphing the CalculateFineTotal() function of the base class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green;"&gt;' This is morphing the CalculateFineTotal(double) function of the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green;"&gt;'&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;audiocassette class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green;"&gt;' This function overrides the base class function, and any call&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green;"&gt;'&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;to CalculateFineTotal() from any instantiated AudioCassette&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green;"&gt;'&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Class will use this function, not the base class function.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green;"&gt;' This type of polymorphism is called overloading and overriding.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Public&lt;/span&gt; &lt;span style="color: blue;"&gt;Overloads&lt;/span&gt; &lt;span style="color: blue;"&gt;Overrides&lt;/span&gt; &lt;span style="color: blue;"&gt;Function&lt;/span&gt; CalculateFineTotal() &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;Double&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; daysOverdue &lt;span style="color: blue;"&gt;As&lt;/span&gt; Int32 = CalculateDaysOverdue()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;If&lt;/span&gt; daysOverdue &amp;gt; 0 &lt;span style="color: blue;"&gt;Then&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Return&lt;/span&gt; daysOverdue * 0.25&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Return&lt;/span&gt; 0.0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&gt;If&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&gt;Function&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green;"&gt;' This is morphing the CalculateFineTotal() function of the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green;"&gt;'&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;audiocassette class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green;"&gt;' This type of polymorphism is called overloading.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Public&lt;/span&gt; &lt;span style="color: blue;"&gt;Overloads&lt;/span&gt; &lt;span style="color: blue;"&gt;Function&lt;/span&gt; CalculateFineTotal(&lt;span style="color: blue;"&gt;ByVal&lt;/span&gt; finePerDay &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;Double&lt;/span&gt;) &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;Double&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; daysOverdue &lt;span style="color: blue;"&gt;As&lt;/span&gt; Int32 = CalculateDaysOverdue()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;If&lt;/span&gt; daysOverdue &amp;gt; 0 &lt;span style="color: blue;"&gt;AndAlso&lt;/span&gt; finePerDay &amp;gt; 0.0 &lt;span style="color: blue;"&gt;Then&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Return&lt;/span&gt; daysOverdue * finePerDay&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Return&lt;/span&gt; 0.0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&gt;If&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&gt;Function&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;End&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt; &lt;span style="color: blue;"&gt;Class&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;/div&gt;&lt;p&gt;You see our library asset class.&amp;nbsp; Pay attention to theoverridable function CalculateFineTotal().&amp;nbsp; In LibraryAsset, wehave defined the default functionality for this method that any derivedclasses can use.&amp;nbsp; Any class derived from LibraryAsset can use thisdefault behavior and calculate fines based on the defaultimplementation of $1.25 per day late.&amp;nbsp; This is true for ourMagazine class.&amp;nbsp; We didn’t override the function so when late feesare calculated for late magazine returns, it will use the defaultimplementation.&lt;/p&gt;&lt;p&gt;Now look at the book class.&amp;nbsp; We have overridden theCalculateFineTotal to use a different value when determining latefees.&amp;nbsp; The overrides keywork in VB tells the caller that anymethod call will use the virtual method found in Book, not the defaultimplementation found in LibraryAsset.&amp;nbsp; We have implemented runtimepolymorphism – method overriding.&lt;/p&gt;&lt;p&gt;Lets move on to AudioCassette.&amp;nbsp; Here we have the same methodoverriding we found in the book class.&amp;nbsp; Fines are calculated basedon $0.25 per day.&amp;nbsp; Notice we’ve added something extra.&amp;nbsp; We’veadded the Overloads keywork to our function and to a new function withthe same name, except the new function now accepts a parameter.&amp;nbsp;Now the caller can call either method, and depending on whether or nota parameter is passed, that determines with method will beexecuted.&amp;nbsp; Notice we do not include the overrides keywork in the2nd function with a parameter.&amp;nbsp; This is because not method existsin LibraryAsset with that same signature (accepting a parameter of typedouble).&amp;nbsp; You can only override methods with the same signature ina base class.&lt;/p&gt;&lt;p&gt;Now lets look at some code that creates all these library items andchecks them in and cacluates our fines based on returning them 3 dayslate:&lt;/p&gt;&lt;div style="border: 1pt solid windowtext; padding: 0pt; background: white none repeat scroll 0% 50%; font-size: 8pt; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; color: black; font-family: Courier New;"&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;Public&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt; &lt;span style="color: blue;"&gt;Class&lt;/span&gt; Demo&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Public&lt;/span&gt; &lt;span style="color: blue;"&gt;Sub&lt;/span&gt; Go()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green;"&gt;' Set the due date to be three days ago&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; dueDate &lt;span style="color: blue;"&gt;As&lt;/span&gt; DateTime = DateAdd(DateInterval.Day, -3, Now())&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ReturnMagazine(dueDate)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ReturnBook(dueDate)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ReturnAudioCassette(dueDate)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&gt;Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Public&lt;/span&gt; &lt;span style="color: blue;"&gt;Sub&lt;/span&gt; ReturnMagazine(&lt;span style="color: blue;"&gt;ByVal&lt;/span&gt; dueDate &lt;span style="color: blue;"&gt;As&lt;/span&gt; DateTime)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; myMagazine &lt;span style="color: blue;"&gt;As&lt;/span&gt; LibraryAsset = &lt;span style="color: blue;"&gt;New&lt;/span&gt; Magazine&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;myMagazine.DueDate = dueDate&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; amountDue &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;Double&lt;/span&gt; = myMagazine.CalculateFineTotal()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Console.WriteLine("Magazine: {0}", amountDue.ToString())&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&gt;Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Public&lt;/span&gt; &lt;span style="color: blue;"&gt;Sub&lt;/span&gt; ReturnBook(&lt;span style="color: blue;"&gt;ByVal&lt;/span&gt; dueDate &lt;span style="color: blue;"&gt;As&lt;/span&gt; DateTime)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; myBook &lt;span style="color: blue;"&gt;As&lt;/span&gt; LibraryAsset = &lt;span style="color: blue;"&gt;New&lt;/span&gt; Book&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;myBook.DueDate = dueDate&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; amountDue &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;Double&lt;/span&gt; = myBook.CalculateFineTotal()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Console.WriteLine("Book: {0}", amountDue.ToString())&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&gt;Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Public&lt;/span&gt; &lt;span style="color: blue;"&gt;Sub&lt;/span&gt; ReturnAudioCassette(&lt;span style="color: blue;"&gt;ByVal&lt;/span&gt; dueDate &lt;span style="color: blue;"&gt;As&lt;/span&gt; DateTime)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; myAudioCassette &lt;span style="color: blue;"&gt;As&lt;/span&gt; AudioCassette = &lt;span style="color: blue;"&gt;New&lt;/span&gt; AudioCassette&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;myAudioCassette.DueDate = dueDate&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; amountDue &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;Double&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;amountDue = myAudioCassette.CalculateFineTotal()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Console.WriteLine("AudioCassette1: {0}", amountDue.ToString())&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;amountDue = myAudioCassette.CalculateFineTotal(3.0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Console.WriteLine("AudioCassette2: {0}", amountDue.ToString())&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&gt;Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Arial;"&gt;End&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt; &lt;span style="color: blue;"&gt;Class&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;/div&gt;&lt;p&gt;The output will look like the following:&lt;/p&gt;&lt;p&gt;Magazine: 3.75&lt;br&gt;Book: 2.25&lt;br&gt;AudioCassette1: 0.75&lt;br&gt;AudioCassette2: 9&lt;/p&gt;&lt;p&gt;You can see how all of our output was different, based on the methodthat was executed.&amp;nbsp; We created a new Magazine, which is a type ofLibraryAsset.&amp;nbsp; That is why the instantiation says “myMagazine AsLibraryAsset”.&amp;nbsp; However, since we actually want a magazine, wecreate a “New Magazine”.&amp;nbsp; Same thing with book.&amp;nbsp; For Book,its a little bit more tricky.&amp;nbsp; Since we created a Book of the typeLibraryAsset, this is where the polymorphism comes into play.&amp;nbsp;Book overrides the CalculateFineTotal of LibraryAsset.&amp;nbsp;Audiocassette is a little bit different.&amp;nbsp; It actually extends theimplementation of LibraryAsset by including an overloaded function forCalculateFineTotal().&amp;nbsp; If we weren’t going to use the functionthat took a parameter, we would create it the same way we created theBook and Magazine classes.&amp;nbsp; But in order to use the overloadedfunction, we have to create a new AudioCassette of the typeAudioCassette, because LibraryAsset doesn’t support the overloadedfunction.&lt;/p&gt;&lt;p&gt;Only the Magazine used the default method found in the baseclass.&amp;nbsp; Book and AudioCassette used their own implementations ofthe method.&amp;nbsp; Also, at compile time, the decision was made whichmethod would be used when we calculate amountDue for the AudioCassetteclass.&amp;nbsp; The first call used the 1st method in AudioCassettewithout parameters.&amp;nbsp; The 2nd call used the 2nd method with aparameter.&lt;/p&gt;&lt;p&gt;Currently listening to: &lt;a href="http://phobos.apple.com/WebObjects/MZSearch.woa/wa/advancedSearchResults?songTerm=Paul%20Revere&amp;amp;artistTerm=Beastie%20Boys" title="http://phobos.apple.com/WebObjects/MZSearch.woa/wa/advancedSearchResults?songTerm=Paul%20Revere&amp;amp;artistTerm=Beastie%20Boys"&gt;Paul Revere&lt;/a&gt; - &lt;a href="http://phobos.apple.com/WebObjects/MZSearch.woa/wa/advancedSearchResults?artistTerm=Beastie%20Boys" title="http://phobos.apple.com/WebObjects/MZSearch.woa/wa/advancedSearchResults?artistTerm=Beastie%20Boys"&gt;Beastie Boys&lt;/a&gt;&lt;/p&gt;&lt;img src ="http://codebetter.com/blogs/raymond.lewallen/aggbug/59836.aspx" width = "1" height = "1" /&gt;&lt;p class="ngrelatedlinks" align="right"&gt;&lt;a href="http://services.newsgator.com/subscriber/Related.aspx?relurl=http%3a%2f%2fcodebetter.com%2fblogs%2fraymond.lewallen%2farchive%2f2005%2f03%2f15%2f59836.aspx"&gt;Related...&lt;/a&gt;&lt;/p&gt;&lt;p class="ngpostlinks"&gt;&lt;a href="http://codebetter.com/blogs/raymond.lewallen/archive/2005/03/15/59836.aspx"&gt;http://codebetter.com/blogs/raymond.lewallen/archive/2005/03/15/59836.aspx&lt;/a&gt;&amp;nbsp; | &amp;nbsp;&lt;a href="http://codebetter.com/blogs/raymond.lewallen/archive/2005/03/15/59836.aspx#comment"&gt;Comments&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src ="http://www.tourneylogic.com/Blogs/links/aggbug/450.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tourney Logic</dc:creator><title>Shortcut keys to learn this week (from: Jason Haley)</title><link>http://www.tourneylogic.com/Blogs/links/archive/2005/03/16/449.aspx</link><pubDate>Wed, 16 Mar 2005 20:02:00 GMT</pubDate><guid>http://www.tourneylogic.com/Blogs/links/archive/2005/03/16/449.aspx</guid><description>&lt;div&gt;&lt;link href="c:\progra~1\newsga~1\ngstyles.css" type="text/css" rel="stylesheet" /&gt;&amp;nbsp; &lt;P style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;This week's short cut keys to learn&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; TEXT-DECORATION: underline; mso-outline-level: 1"&gt;Day 16 -Debugging (should already know most of these)&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;F5 = Start&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Shift + F5 = Stop Debugging&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Ctrl + F5 = Start Without Debugging&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;F11 = Step Into&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Shift + F11 = Step Out&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;F10 = Step Over&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; TEXT-DECORATION: underline; mso-outline-level: 1"&gt;Day 17 - Debugging windows&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Ctrl + Alt V, T = This&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Ctrl + Alt + H = Threads&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; TEXT-DECORATION: underline; mso-outline-level: 1"&gt;Day 18 - Text editing&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Shift + Alt + Down Arrow = Line Down Extend Column&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Shift + Alt + Up Arrow = Line Up Extend Column&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; TEXT-DECORATION: underline; mso-outline-level: 1"&gt;Day 19 - Text editing&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Ctrl + Shift + U = Make Uppercase (Great for those of you who capitalize constants)&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Ctrl + U = Make Lowercase&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; TEXT-DECORATION: underline; mso-outline-level: 1"&gt;Day 20 - MSDN Help &lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Shift + Alt + F3 = Search results&lt;/P&gt;&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Shift + Alt + F2 = Index results&lt;/P&gt;&lt;HR NOSHADE SIZE="1"&gt;This Blog Hosted On: http://www.DotNetJunkies.com/&lt;img src ="http://dotnetjunkies.com/WebLog/jhaley/aggbug/56268.aspx" width = "1" height = "1" /&gt;&lt;p class="ngrelatedlinks" align="right"&gt;&lt;a href="http://services.newsgator.com/subscriber/Related.aspx?relurl=http%3a%2f%2fdotnetjunkies.com%2fWebLog%2fjhaley%2farchive%2f2005%2f02%2f23%2f56268.aspx"&gt;Related...&lt;/a&gt;&lt;/p&gt;&lt;p class="ngpostlinks"&gt;&lt;a href="http://dotnetjunkies.com/WebLog/jhaley/archive/2005/02/23/56268.aspx"&gt;http://dotnetjunkies.com/WebLog/jhaley/archive/2005/02/23/56268.aspx&lt;/a&gt;&amp;nbsp; | &amp;nbsp;&lt;a href="http://dotnetjunkies.com/WebLog/jhaley/archive/2005/02/23/56268.aspx#comment"&gt;Comments&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src ="http://www.tourneylogic.com/Blogs/links/aggbug/449.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tourney Logic</dc:creator><title>Advanced ASP.NET Caching and AddValidationCallBack (from: ComputerZen.com - Scott Hanselman's Weblog)</title><link>http://www.tourneylogic.com/Blogs/links/archive/2005/03/16/445.aspx</link><pubDate>Wed, 16 Mar 2005 20:01:00 GMT</pubDate><guid>http://www.tourneylogic.com/Blogs/links/archive/2005/03/16/445.aspx</guid><description>&lt;DIV&gt;&lt;STRONG&gt;EDIT: &lt;/STRONG&gt;Content&amp;nbsp;removed per Scott's request.&amp;nbsp;
&lt;P class=ngpostlinks&gt;&lt;A href="http://www.hanselman.com/blog/AdvancedASPNETCachingAndAddValidationCallBack.aspx"&gt;http://www.hanselman.com/blog/AdvancedASPNETCachingAndAddValidationCallBack.aspx&lt;/A&gt;&amp;nbsp; | &amp;nbsp;&lt;A href="http://www.hanselman.com/blog/CommentView,guid,101293be-1ea7-4088-87d8-cfe8fa31242f.aspx"&gt;Comments&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;img src ="http://www.tourneylogic.com/Blogs/links/aggbug/445.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tourney Logic</dc:creator><title>Cool MSI custom action debugging tool (from: Aaron Stebner)</title><link>http://www.tourneylogic.com/Blogs/links/archive/2005/03/16/447.aspx</link><pubDate>Wed, 16 Mar 2005 20:01:00 GMT</pubDate><guid>http://www.tourneylogic.com/Blogs/links/archive/2005/03/16/447.aspx</guid><description>&lt;div&gt;&lt;link href="c:\progra~1\newsga~1\ngstyles.css" type="text/css" rel="stylesheet" /&gt;&lt;p&gt;&lt;font face="Verdana" size="2"&gt;I posted &lt;/font&gt;&lt;A href="http://blogs.msdn.com/astebner/archive/2005/03/02/384088.aspx" title="http://blogs.msdn.com/astebner/archive/2005/03/02/384088.aspx"&gt;&lt;font face="Verdana" size="2"&gt;an item on my blog&lt;/font&gt;&lt;/a&gt;&lt;font face="Verdana" size="2"&gt; last week with some details about how Windows Installer custom actions work behind the scenes.&amp;nbsp; Some of the feedback I got back after posting this item asked some good questions about debugging strategies for custom actions.&amp;nbsp; Based on that, I&amp;nbsp;wanted to share&amp;nbsp;a wrapper DLL written by Jungwook Bae, a developer on the Visual Studio and .NET Framework setup team.&amp;nbsp; His tool makes the process of implementing and debugging DLL custom actions much simpler.&amp;nbsp; You can download the tool itself by clicking &lt;/font&gt;&lt;a href="http://astebner.sts.winisp.net/Tools/catest.zip.txt" title="http://astebner.sts.winisp.net/Tools/catest.zip.txt"&gt;&lt;font face="Verdana" size="2"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font face="Verdana" size="2"&gt;.&amp;nbsp; The following is more information about the wrapper DLL and how to use it:&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;font face="Verdana" size="2"&gt;CATest -&amp;nbsp;a tool that will help developing custom action DLLs&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;One of the biggest pains when writing custom actions is whenever you modify the DLL, you have to stream the new DLL into the MSI and restart setup. Deferred custom actions are the most difficult because you have to wait until all the files are copied and registry values are written again, which can take a very long time for large products.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;To get around this problem, you can use catest.dll as a wrapper for the custom action DLL you are writing. You can test your custom action DLL without streaming it into your MSI, and you can run it as many times you want without restarting setup.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;font face="Verdana" size="2"&gt;How to use CATest:&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;font face="Verdana" size="2"&gt;Add catest.dll to the binary table of your MSI (by using &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/orca_exe.asp" title="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/orca_exe.asp"&gt;Orca&lt;/a&gt; or some other tool)&lt;/font&gt;&lt;/li&gt; &lt;li&gt;&lt;font face="Verdana" size="2"&gt;Share out your build folder so that your DLL and PDBs are accessible from a test machine&lt;/font&gt;&lt;/li&gt; &lt;li&gt;&lt;font face="Verdana" size="2"&gt;Modify catest.ini to match your custom action name, path to DLL and EntryPoint.&amp;nbsp; You can debug the following 4 types of custom actions: Immediate, Deferred, Rollback, and Commit. You do not need to include all 4 sections in catest.ini; instead you can include only the ones you want to test.&lt;/font&gt;&lt;/li&gt; &lt;li&gt;&lt;font face="Verdana" size="2"&gt;Copy modified catest.ini to %windir% on the machine we are testing.&lt;/font&gt;&lt;/li&gt; &lt;li&gt;&lt;font face="Verdana" size="2"&gt;Modify the custom action records in the CustomAction table of your MSI to point to catest for each of the custom actions you want to debug. Each custom action you want to be able to debug should have "catest" as the Source value and the Target value, and&amp;nbsp;should match the custom actions that you list in catest.ini.&lt;/font&gt;&lt;/li&gt; &lt;li&gt;&lt;font face="Verdana" size="2"&gt;Now you are ready to go, so run the setup. When prompted to attach a debugger, you can attach your favorite debugger and click OK. Then, you can load your symbols and open source files to step through the code. When the custom action finishes, a dialog will ask if you want to retry the custom action. You can update your code and rebuild the DLL, then choose to retry the custom action and debug it again within the same installation session. Note: you will have to reload your symbols if you rebuild and rerun the custom action.&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;font face="Verdana" size="2"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;&lt;img src ="http://weblogs.asp.net/astebner/aggbug/388739.aspx" width = "1" height = "1" /&gt;&lt;p class="ngrelatedlinks" align="right"&gt;&lt;a href="http://services.newsgator.com/subscriber/Related.aspx?relurl=http%3a%2f%2fweblogs.asp.net%2fastebner%2farchive%2f2005%2f03%2f07%2f388739.aspx"&gt;Related...&lt;/a&gt;&lt;/p&gt;&lt;p class="ngpostlinks"&gt;&lt;a href="http://weblogs.asp.net/astebner/archive/2005/03/07/388739.aspx"&gt;http://weblogs.asp.net/astebner/archive/2005/03/07/388739.aspx&lt;/a&gt;&amp;nbsp; | &amp;nbsp;&lt;a href="http://weblogs.asp.net/astebner/archive/2005/03/07/388739.aspx#comment"&gt;Comments&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src ="http://www.tourneylogic.com/Blogs/links/aggbug/447.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tourney Logic</dc:creator><title>Recycling the ASP.NET worker process at set intervals (from: Steve Hebert)</title><link>http://www.tourneylogic.com/Blogs/links/archive/2005/03/16/448.aspx</link><pubDate>Wed, 16 Mar 2005 20:01:00 GMT</pubDate><guid>http://www.tourneylogic.com/Blogs/links/archive/2005/03/16/448.aspx</guid><description>&lt;div&gt;&lt;link href="c:\progra~1\newsga~1\ngstyles.css" type="text/css" rel="stylesheet" /&gt;&lt;FONT face=Arial size=2&gt;Many ASP.NET developers are not aware of the ability to restart the ASP.NET worker process at given intervals in code.&amp;nbsp; While IIS6.0 makes a number of these features available through the UI, most of the features can be used in IIS5 and 5.1 as well.&amp;nbsp; I've found this useful for rogue components that are consuming memory and this provides a bandaid fix until the root problem is identified.&lt;/FONT&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;The &amp;lt;processModel&amp;gt; model configuration setting&amp;nbsp;allows you to set limits that any given running ASPNET_WP process will operate under until it's recycled.&amp;nbsp; For instance, if I set requestLimit="10000", a given ASPNET_WP process will run until 10000 requests have been serviced.&amp;nbsp; At that time, a new ASPNET_WP service will start and requests will be directed&amp;nbsp;at it.&amp;nbsp; The old ASPNET_WP process will then be shut down.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;This setting can be made in the machine.config file and affects all processes .Net processes on that machine.&amp;nbsp; The related MSDN article can be found &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfprocessmodelsection.asp" title="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfprocessmodelsection.asp"&gt;here&lt;/A&gt;.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;img src ="http://codebetter.com/blogs/steve.hebert/aggbug/56663.aspx" width = "1" height = "1" /&gt;&lt;p class="ngrelatedlinks" align="right"&gt;&lt;a href="http://services.newsgator.com/subscriber/Related.aspx?relurl=http%3a%2f%2fcodebetter.com%2fblogs%2fsteve.hebert%2farchive%2f2005%2f03%2f07%2f56663.aspx"&gt;Related...&lt;/a&gt;&lt;/p&gt;&lt;p class="ngpostlinks"&gt;&lt;a href="http://codebetter.com/blogs/steve.hebert/archive/2005/03/07/56663.aspx"&gt;http://codebetter.com/blogs/steve.hebert/archive/2005/03/07/56663.aspx&lt;/a&gt;&amp;nbsp; | &amp;nbsp;&lt;a href="http://codebetter.com/blogs/steve.hebert/archive/2005/03/07/56663.aspx#comment"&gt;Comments&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src ="http://www.tourneylogic.com/Blogs/links/aggbug/448.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tourney Logic</dc:creator><title>A Boilerplate HttpHandler (from: ComputerZen.com - Scott Hanselman's Weblog)</title><link>http://www.tourneylogic.com/Blogs/links/archive/2005/03/16/443.aspx</link><pubDate>Wed, 16 Mar 2005 20:00:00 GMT</pubDate><guid>http://www.tourneylogic.com/Blogs/links/archive/2005/03/16/443.aspx</guid><description>&lt;DIV&gt;
&lt;P xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;FONT face="Courier New" xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;FONT face=Arial&gt;&lt;STRONG&gt;EDIT: &lt;/STRONG&gt;Content&amp;nbsp;removed per Scott's request.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;FONT face="Courier New" xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;A href="http://www.hanselman.com/blog/ABoilerplateHttpHandler.aspx"&gt;http://www.hanselman.com/blog/ABoilerplateHttpHandler.aspx&lt;/A&gt;&amp;nbsp; | &amp;nbsp;&lt;A href="http://www.hanselman.com/blog/CommentView,guid,5c59d662-b250-4eb2-96e4-f274295bd52e.aspx"&gt;Comments&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/FONT&gt;&lt;img src ="http://www.tourneylogic.com/Blogs/links/aggbug/443.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tourney Logic</dc:creator><title>.Net performance: Boxing vs. parsing (from: James Geurts)</title><link>http://www.tourneylogic.com/Blogs/links/archive/2005/03/16/444.aspx</link><pubDate>Wed, 16 Mar 2005 20:00:00 GMT</pubDate><guid>http://www.tourneylogic.com/Blogs/links/archive/2005/03/16/444.aspx</guid><description>&lt;div&gt;&lt;link href="c:\progra~1\newsga~1\ngstyles.css" type="text/css" rel="stylesheet" /&gt;&lt;p&gt;I just asked this in a performance chat w/ &lt;a href="http://blogs.msdn.com/ricom/" title="http://blogs.msdn.com/ricom/"&gt;Rico&lt;/a&gt;.  It might be of use to some developers that are curious about these sorts of things...&lt;/p&gt;&lt;p&gt;Q: Hey Rico. How much of a performance difference is there between boxing vs. parsing. For instance: &lt;br&gt;&lt;code&gt;return (bool)ViewState["myvar"];&lt;/code&gt;&lt;br&gt; vs. &lt;br&gt;&lt;code&gt;return bool.parse(ViewState["myvar"].ToString());&lt;/code&gt;&lt;br&gt;&lt;br&gt;A: Parsing is a total disaster compared to boxing. ToString will make a string then it will be parsed. Actually in that example there's just unboxing which is really cheap. Very few cases of boxing would ever be more expensive than making a temp string -- it's not *that* bad to box&lt;/p&gt;&lt;p&gt;This was mainly due to an FxCop rule that says that it is bad to box values.  Apparently this is one case where boxing is much better than the alternative.&lt;/p&gt;&lt;img src ="http://blogs.biasecurities.com/jim/aggbug/985.aspx" width = "1" height = "1" /&gt;&lt;p class="ngrelatedlinks" align="right"&gt;&lt;a href="http://services.newsgator.com/subscriber/Related.aspx?relurl=http%3a%2f%2fblogs.biasecurities.com%2fjim%2farchive%2f2005%2f03%2f09%2f985.aspx"&gt;Related...&lt;/a&gt;&lt;/p&gt;&lt;p class="ngpostlinks"&gt;&lt;a href="http://blogs.biasecurities.com/jim/archive/2005/03/09/985.aspx"&gt;http://blogs.biasecurities.com/jim/archive/2005/03/09/985.aspx&lt;/a&gt;&amp;nbsp; | &amp;nbsp;&lt;a href="http://blogs.biasecurities.com/jim/archive/2005/03/09/985.aspx#comment"&gt;Comments&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src ="http://www.tourneylogic.com/Blogs/links/aggbug/444.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tourney Logic</dc:creator><title>Anti-Spam inputs using random client IDs (from: Brian Scott)</title><link>http://www.tourneylogic.com/Blogs/links/archive/2005/02/22/392.aspx</link><pubDate>Tue, 22 Feb 2005 20:40:00 GMT</pubDate><guid>http://www.tourneylogic.com/Blogs/links/archive/2005/02/22/392.aspx</guid><description>&lt;div&gt;&lt;link href="c:\progra~1\newsga~1\ngstyles.css" type="text/css" rel="stylesheet" /&gt;	&lt;P&gt;Recently I have been thinking about ways to make it harder for spam bots to submit blog comments or any other type of spam. Most likely they are sending out custom POST requests to comment pages where the name or&amp;nbsp;ID of the form fields is well known.&amp;nbsp; It is&amp;nbsp;just a simple matter of supplying values for those field names and posting the request to the appropriate url.&lt;/P&gt;&lt;P&gt;The solution I thought about was giving all the input fields random IDs.&amp;nbsp; The IDs should change for each new request to the page, except on postback.&amp;nbsp; However, I was not&amp;nbsp;sure how this would work with the page lifecycle and postbacks.&amp;nbsp; Would I still be able to easily access the control by the ID&amp;nbsp;I explicitly&amp;nbsp;assigned it.&amp;nbsp; If not, how much work would it be to find a control by&amp;nbsp;the random ID that is generated at runtime for each new non-postback request.&lt;/P&gt;&lt;P&gt;I sat down played with a TextBox on an aspx page for a couple minutes.&amp;nbsp;I discovered it is much simpler than I originally thought it would be.&amp;nbsp; Changing the ID in the Page_Load event didn&amp;#8217;t affect my ability to access&amp;nbsp;the TextBox&amp;nbsp;by the original ID I had explicitly assigned it.&amp;nbsp; In order to restore the ID on a postback, I put the generated ID into a session variable identified by the ClientID that ASP.NET generates.&amp;nbsp;On a postback, the TextBox ID is restored to the generated ID.&amp;nbsp; On all new requests, a new random ID is generated.&lt;/P&gt;&lt;P&gt;Next, I&amp;nbsp;sub-classed a TextBox and dropped the code in the OnLoad override.&amp;nbsp; I was happy to see that I could use this control exactly like a regular TextBox with no additional or different programming.&amp;nbsp; The ID on the client changed with each new request, but my code behind did not care.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;P dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;SPAN style="FONT-SIZE: 11px; FONT-FAMILY: Courier New"&gt;[DefaultProperty(&lt;SPAN style="FONT-SIZE: 11px; COLOR: maroon; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;"Text"&lt;/SPAN&gt;), &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px; FONT-FAMILY: Courier New"&gt;ToolboxData(&lt;SPAN style="FONT-SIZE: 11px; COLOR: maroon; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;"&amp;lt;{0}:AntiSpamTextBox runat=server&amp;gt;"&lt;/SPAN&gt;)]&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;public&lt;/SPAN&gt; &lt;SPAN style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;class&lt;/SPAN&gt; AntiSpamTextBox : TextBox&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;public&lt;/SPAN&gt; AntiSpamTextBox()&amp;nbsp;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{}&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;protected&lt;/SPAN&gt; &lt;SPAN style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;override&lt;/SPAN&gt; &lt;SPAN style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;void&lt;/SPAN&gt; OnLoad(System.EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HttpContext context = HttpContext.Current;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;if&lt;/SPAN&gt;(!Page.IsPostBack)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;string&lt;/SPAN&gt; id &lt;SPAN style="FONT-SIZE: 11px; COLOR: purple; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;=&lt;/SPAN&gt; Guid.NewGuid().ToString(&lt;SPAN style="FONT-SIZE: 11px; COLOR: maroon; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;"N"&lt;/SPAN&gt;);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;context.Session.Add(ClientID, id);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ID &lt;SPAN style="FONT-SIZE: 11px; COLOR: purple; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;=&lt;/SPAN&gt; id;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;else&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ID &lt;SPAN style="FONT-SIZE: 11px; COLOR: purple; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;=&lt;/SPAN&gt; context.Session[ClientID].ToString();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: white"&gt;base&lt;/SPAN&gt;.OnLoad (e);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This may be over simplistic, but it seems like it would help.&amp;nbsp; I tested multiple controls on one page and they all performed as expected, each having a different, random ID.&amp;nbsp; I was also able to correctly access each controls value in the code behind during a postback.&amp;nbsp; As is, the control still needs some code to deal with expired sessions, but I'm still thinking about the best way to persist the ID between requests.&amp;nbsp; Viewstate may work.&lt;/P&gt;&lt;P&gt;I used the ClientID because at that point in the code, the ClientID is still the unique ID generated by ASP.NET.&amp;nbsp; It seemed like a good candidate to distinguish between multiple controls on the same page.&lt;/P&gt;&lt;P&gt;Anyone else think this could be useful?&amp;nbsp; Any thoughts on other ways to do it?&amp;nbsp;&lt;/P&gt;&lt;img src ="http://blogs.geekdojo.net/brian/aggbug/6194.aspx" width = "1" height = "1" /&gt;	&lt;p class="ngrelatedlinks" align="right"&gt;&lt;a href="http://services.newsgator.com/subscriber/Related.aspx?relurl=http%3a%2f%2fblogs.geekdojo.net%2fbrian%2farchive%2f2005%2f01%2f11%2f6194.aspx"&gt;			Related...		&lt;/a&gt;&lt;/p&gt;&lt;p class="ngpostlinks"&gt;&lt;a href="http://blogs.geekdojo.net/brian/archive/2005/01/11/6194.aspx"&gt;http://blogs.geekdojo.net/brian/archive/2005/01/11/6194.aspx&lt;/a&gt;&amp;nbsp; | &amp;nbsp;&lt;a href="http://blogs.geekdojo.net/brian/archive/2005/01/11/6194.aspx#comment"&gt;Comments&lt;/a&gt;&lt;/p&gt;&lt;/div&gt; &lt;img src ="http://www.tourneylogic.com/Blogs/links/aggbug/392.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tourney Logic</dc:creator><title>Goodbye Web Forms (from: Blogtastic)</title><link>http://www.tourneylogic.com/Blogs/links/archive/2005/02/22/384.aspx</link><pubDate>Tue, 22 Feb 2005 20:39:00 GMT</pubDate><guid>http://www.tourneylogic.com/Blogs/links/archive/2005/02/22/384.aspx</guid><description>&lt;div&gt;&lt;link href="c:\progra~1\newsga~1\ngstyles.css" type="text/css" rel="stylesheet" /&gt;	Today I committed the &lt;a href="http://ccnetlive.thoughtworks.com/ccnet/default.aspx?_action_ViewBuildReport=true&amp;server=CCNetLive%201&amp;project=CCNetLive%20-%20CCNet&amp;build=log20050221202231Lbuild.0_8_0_775.xml" title="http://ccnetlive.thoughtworks.com/ccnet/default.aspx?_action_ViewBuildReport=true&amp;server=CCNetLive%201&amp;project=CCNetLive%20-%20CCNet&amp;build=log20050221202231Lbuild.0_8_0_775.xml"&gt;final changes&lt;/a&gt; to a large chunk of CruiseControl.NET work that I'm rather proud of, namely removing all Web Forms code from the &lt;a href="http://confluence.public.thoughtworks.org/display/CCNET/Web+Dashboard+Reporting+Features" title="http://confluence.public.thoughtworks.org/display/CCNET/Web+Dashboard+Reporting+Features"&gt;Dashboard Web App&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;'What??' you may cry. 'You've stopped using ASP.NET??' No, I've just stopped using &lt;b&gt;Web Forms&lt;/b&gt;. Web Forms are those &lt;code&gt;.aspx&lt;/code&gt; files you write and their code behinds. They're also the things that use server controls, view state and other such components that make up most of .NET web apps. I'm still using the ASP.NET runtime in the form of an IHttpHandler. This is a much more lightweight way of developing web apps, similar to Java's Servlets.&lt;br/&gt;&lt;br/&gt;So why have I done this and thrown away the incredibally rich &lt;code&gt;System.Web.UI&lt;/code&gt; namespace? Well for a number of reasons, but chiefly because of &lt;b&gt;testability&lt;/b&gt; and &lt;b&gt;simplicity&lt;/b&gt;. &lt;br/&gt;&lt;br/&gt;Web Forms are hard things to unit test. Basically you can't. This is because of how closely tied all Page implementations are into the ASP.NET framework. To introduce testability you have to keep your code-behinds very thin, but once you've got a few controls on your page this is tricky. Also, any logic that you put in the &lt;code&gt;.aspx&lt;/code&gt; file itself is even harder to test, and this includes any templates, grid setup or whatever.&lt;br/&gt;&lt;br/&gt;ASP.NET Web Forms also seem to be incredibally complex to me. The Page class alone is a pretty big beast, with all those events going on under the hood. And don't even start me on Data Grids and Data Binding. Easy to setup something up in a prototype, yes, but &lt;b&gt;simple to maintain&lt;/b&gt;? I'm not convinced. Fundamentally, web apps &lt;b&gt;should&lt;/b&gt; be simple. You have a request with a bunch of parameters and you produce a response which is (to most intents and purposes) a string. Now I know that Web Forms are supposed to introduce a new model above all this stuff, but I don't think the abstraction works particularly well once you get beyond a prototype.&lt;br/&gt;&lt;br/&gt;So anyway, I decided to try and get rid of using Web Forms. I've evolved a new web framework, based a little bit on &lt;a href="http://www.opensymphony.com/webwork_old/" title="http://www.opensymphony.com/webwork_old/"&gt;WebWork&lt;/a&gt;. It has an ultra simple front-controller and is based on decorated actions. Views are just html strings, but I'm using &lt;a href="http://nvelocity.sourceforge.net/" title="http://nvelocity.sourceforge.net/"&gt;NVelocity&lt;/a&gt; to generate them. I'm using an IHttpHandler to process requests, and at the moment I'm overriding the &lt;code&gt;.aspx&lt;/code&gt; extension to be handled by my custom handler, not the Web Forms handler.&lt;br/&gt;&lt;br/&gt;Will this be any use outside of CruiseControl.NET? I'm not sure - I might just be going off on one. But that said a good number of my Java-developing colleagues in ThoughtWorks have migrated from using &lt;a href="http://struts.apache.org/" title="http://struts.apache.org/"&gt;Struts&lt;/a&gt; to &lt;a href="http://www.opensymphony.com/webwork_old/" title="http://www.opensymphony.com/webwork_old/"&gt;WebWork&lt;/a&gt;, for similar to reasons to why I've moved away from Web Forms. Is any of my code re-usable? I think so, indeed I hope to spin off the web framework as a separate open source project, but the point is it &lt;b&gt;is&lt;/b&gt; possible to write perfectly decent web applications in .NET without using Web Forms.&lt;br/&gt;&lt;br/&gt;Finally, I'd like to give significant kudos to &lt;a href="http://joe.truemesh.com/blog/" title="http://joe.truemesh.com/blog/"&gt;Joe Walnes&lt;/a&gt;. He wrote some of WebWork, and badgered me to think about using it as a basis of a new web framework for .NET. He also introduced to me the ideas of using IHttpHandler's as the entry point for such a custom framework and of overriding &lt;code&gt;.aspx&lt;/code&gt; handling to avoid reconfiguring IIS.&lt;br/&gt;	&lt;p class="ngrelatedlinks" align="right"&gt;&lt;a href="http://services.newsgator.com/subscriber/Related.aspx?relurl=http%3a%2f%2fmikeroberts.thoughtworks.net%2fblog%2farchive%2fTech%2fdotNet%2fGoodbyeWebForms.html"&gt;			Related...		&lt;/a&gt;&lt;/p&gt;&lt;p class="ngpostlinks"&gt;&lt;a href="http://mikeroberts.thoughtworks.net/blog/archive/Tech/dotNet/GoodbyeWebForms.html"&gt;http://mikeroberts.thoughtworks.net/blog/archive/Tech/dotNet/GoodbyeWebForms.html&lt;/a&gt;&lt;/p&gt;&lt;/div&gt; &lt;img src ="http://www.tourneylogic.com/Blogs/links/aggbug/384.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tourney Logic</dc:creator><title>Responding to Richard Grimes article on .NET (from: Dan Fernandez)</title><link>http://www.tourneylogic.com/Blogs/links/archive/2005/02/22/385.aspx</link><pubDate>Tue, 22 Feb 2005 20:39:00 GMT</pubDate><guid>http://www.tourneylogic.com/Blogs/links/archive/2005/02/22/385.aspx</guid><description>&lt;div&gt;&lt;link href="c:\progra~1\newsga~1\ngstyles.css" type="text/css" rel="stylesheet" /&gt;	&lt;p&gt;&lt;A href="http://blogs.msdn.com/somasegar/archive/2004/06/03/148131.aspx" title="http://blogs.msdn.com/somasegar/archive/2004/06/03/148131.aspx"&gt;http://blogs.msdn.com/somasegar/archive/2004/06/03/148131.aspx&lt;/a&gt;I recently ran across an article written by Richard Grimes in Dr. Dobbs Journal titled &lt;a href="http://www.ddj.com/documents/s=9211/ddj050201dnn/" title="http://www.ddj.com/documents/s=9211/ddj050201dnn/"&gt;Mr. Grimes farewell&lt;/a&gt;. I wanted to respond to some of Richard's assertions and points in the article. You should take Richard's article with a grain of salt as he does clearly state that the article is "his opinion". That being said, Richard's article is supposed to be his view of the current state of .NET, but rather then discuss how far we've come and where we're going, he instead argues three points - the .NET Framework is too large blocking adoption, issues with the design of the .NET Framework, and&amp;nbsp;over half the article bashing Visual Basic, and finally that Microsoft is "losing confidence" in the .NET Framework. His quotes,&amp;nbsp;&lt;font color="#808080"&gt;&lt;em&gt;italicized in gray&lt;/em&gt;&lt;/font&gt;, and my responses are below. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;On the size of the .NET Framework blocking adoption&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;em&gt;&lt;font color="#808080"&gt;RG:The framework redistributable is 25 MB, which is many times larger than the Java redistributable. One of the lessons of the early versions of Visual Basic was that the shareware and freeware market created the popularity of the language. While there are some shareware apps written in .NET, I often hear people complain about the huge redistributable.&lt;/font&gt;&lt;/em&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;My Response&lt;/strong&gt;: Maybe I'm being too picky, but the size is 23,698K or 23.7MB.&amp;nbsp;While Java's runtime is smaller, it still weighs in at 15MB. Throughout the article, Richard refers to .NET applications when he's really referring to client or public&amp;nbsp;client (meaning not in the firewall) For example, installing the .NET Framework on a server or within an intranet where you can control the environment certainly isn't an issue. Even for public client machines, there's plenty of commercial shareware from games to RSS readers that require the .NET Framework. I've also talked to plenty of shareware developers and they certainly aren't using Java. Many use C/C++, Visual Basic, or Delphi. As far as adoption&amp;nbsp;"and the state of .NET",&amp;nbsp; which the article is supposed to be about is best summarized by Soma,&amp;nbsp;the Developer Division Vice President in &lt;A href="http://blogs.msdn.com/somasegar/archive/2004/06/03/148131.aspx" title="http://blogs.msdn.com/somasegar/archive/2004/06/03/148131.aspx"&gt;his post on .NET Momentum&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&lt;font color="#006400"&gt;&lt;em&gt;Soma: We have seen over 70 million downloads of the .NET framework from Windows Update and the Microsoft Download center to date.&amp;nbsp; For a simple guy like me, that translates to about 5.5 million downloads a month.&amp;nbsp; Another interesting datapoint is that&amp;nbsp;in 2004, we expect to have about 54 million new PCs shipping with the .NET framework installed/preloaded.&amp;nbsp; We also have over 2.5M developers targeting managed code.&lt;/em&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;On the Design of the .NET Framework &lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;em&gt;&lt;font color="#808080"&gt;RG: Almost the first thing I posted on the technical preview newsgroups was a simple console application in Cool, and its equivalent in Java with the rhetoric question to spot the difference. &lt;/font&gt;&lt;/em&gt;&lt;/li&gt; &lt;li&gt;&lt;font color="#808080"&gt;&lt;em&gt;RG: &lt;/em&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;em&gt;&lt;font color="#808080"&gt;There are classes that are mere wrappers around Win32, but there are other classes that appear to be ported from other frameworks. Before it released .NET, Microsoft had its own Java framework library called WFC, and it also had a managed library as part of the Visual Basic (classic) runtime. It would be nice to know how many classes from WFC and VB were ported to .NET.&lt;/font&gt;&lt;/em&gt; &lt;/font&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;My Response&lt;/strong&gt;: These two points contradict each other. In the first he implies that the .NET Framework is a replica of Java,&amp;nbsp;but in the next statement he claims that the .NET Framework is simply ported&amp;nbsp;Win32 classes, Windows Foundation Classes (WFC), and VB runtime classes. Which one is it?&amp;nbsp;If his point is that you can write a simple application and that it will look the same in C# and Java or C++, I don't&amp;nbsp;think that really proves much. Below is an example of a&amp;nbsp;&lt;font face="Courier New"&gt;for&lt;/font&gt; loop.&amp;nbsp; &lt;br /&gt;&lt;font face="Courier New"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;br /&gt;for&lt;/span&gt;&lt;b&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt; (&lt;/span&gt;&lt;/b&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;int&lt;/span&gt;&lt;b&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt; i = 0; i &amp;lt; x; i++) &lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;{...&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;}&lt;/span&gt;&lt;/b&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/font&gt; &lt;p&gt;Guess what language it's written in? If you said either&amp;nbsp;C, C++, C#, and Java, then you are correct. I don't see what he's trying to prove here. If he tries to build a more robust application then "Hello World" your going to run into framework or library specific features (ATL is not, MFC is not EJB, etc).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;On Interface-based Programming and Remoting&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;em&gt;&lt;font color="#808080"&gt;RG: Interfaces are elegant but .NET's preference for class-based solutions has marked the death of interfaces. Look at .NET remoting: This has been provided to allow an object to run in the context where it was created, and be accessed from another context. This means that the object state is kept local, and it is the behavior that is remoted. Thus, remoting is an interface-based facility. You can use .NET remoting with interfaces, but reading through the documentation and all of the “how-tos” on the Web, you wouldn't realize this. &lt;/font&gt;&lt;/em&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Point #1 - Interfaces are dead&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;My Response&lt;/strong&gt;: Interfaces are used everywhere in the .NET Framework and are&amp;nbsp;especially valuable given single inheritance in languages like VB and C#.&amp;nbsp;Even the&amp;nbsp;simple &lt;font face="Courier New"&gt;string&lt;/font&gt; class has IComparable, ICloneable, IConvertible, and IEnumerable interfaces. Going forward, one of the key new features for the .NET Framework 2.0, generics, uses interfaces&amp;nbsp;for constraining&amp;nbsp;data types.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Point #2 -&amp;nbsp;Lack of documentation on using interfaces with .NET Remoting&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&amp;nbsp;&lt;strong&gt;My Response&lt;/strong&gt;: I am by no means saying that our documentation is flawless, but here's a link to the &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpqstart/html/cpsmpnetsamples-howtoremoting.asp" title="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpqstart/html/cpsmpnetsamples-howtoremoting.asp"&gt;.NET Framework SDK Samples on Remoting&lt;/a&gt;. Notice the fifth sample down is using &lt;a href="http://msdn.microsoft.com/library/en-us/cpqstart/html/cpsmpnetsamples-howtoremoting.asp?frame=true#cpsmpinterfacesample" title="http://msdn.microsoft.com/library/en-us/cpqstart/html/cpsmpnetsamples-howtoremoting.asp?frame=true#cpsmpinterfacesample"&gt;Interfaces with remoting&lt;/a&gt;.&amp;nbsp;I also&amp;nbsp;outline our&amp;nbsp;guidance on using interfaces&amp;nbsp;for remoting below.&amp;nbsp;&lt;br /&gt;&lt;/li&gt; &lt;li&gt;&lt;em&gt;&lt;font color="#808080"&gt;.NET can use interfaces but the preferred way is to use classes. &lt;/font&gt;&lt;/em&gt;&lt;/li&gt; &lt;li&gt;&lt;em&gt;&lt;font color="#808080"&gt;RG: Instead, Microsoft prefers people to use a class-based approach, which often results in the bizarre situation of people deploying their server assembly to the client so that the client has the metadata of the service objects available, or a soapsuds assembly, which basically was a hack to get around the problems of having class-based remoting.&lt;/font&gt; &lt;/em&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;My Response&lt;/strong&gt;: We don't "prefer" any mechanism, per se. While we may offer guidance, developers can choose to develop their applications as they see fit.&amp;nbsp;Our Patterns and Practices group does provide guidance and best&amp;nbsp;practices on these and other points and even includes guidelines on &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/ScaleNet-AtGlance.asp" title="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/ScaleNet-AtGlance.asp"&gt;how to design a remote interface&lt;/a&gt;.&amp;nbsp;I don't see a class-based favoritism over interfaces, in fact, there has been an increasing movement to use messages and service orientation rather then object orientation. I concede his&amp;nbsp;point on deploying server assemblies to the client, but poor design is poor design. People deploying a server assembly to a client just so that the metadata of the service objects is available could have easily used an interface or schema instead.&amp;nbsp;That being said, there are some situations where you do in fact want to have server code in each client, the example being a peer-to-peer chat where each client acts as both a client and a server.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;On Microsoft&amp;nbsp;using the .NET Framework for their applications&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;em&gt;&lt;font color="#808080"&gt;Microsoft treats .NET as a useful library to extend its products, and to date, it has not shown any more conviction to the framework. There have been a few .NET products written entirely in .NET; one such product is Microsoft CRM....They do not want the expense of rewriting their existing code for .NET, and there is no compulsion to provide all new code in .NET; instead, .NET will be hosted as and when it's needed, particularly to allow extensibility through user-supplied code.&lt;/font&gt;&lt;/em&gt;&amp;nbsp;&lt;em&gt; &lt;/em&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;My Response&lt;/strong&gt;: We should dissect exactly what Richard says here. He says that Microsoft is using .NET to extend existing products and that Microsoft doesn't want the expense of rewriting applications from scratch in .NET. This makes perfect sense to me, why would we re-write perfectly good code?&amp;nbsp;.NET code&amp;nbsp;can interoperate with existing code, and you bet we're going to take advantage of the interoperability layer to add new features that exploit the best managed code has to offer.&amp;nbsp; As I pointed out previously, &lt;A href="http://blogs.msdn.com/danielfe/archive/2004/11/02/251254.aspx" title="http://blogs.msdn.com/danielfe/archive/2004/11/02/251254.aspx"&gt;Microsoft is using .NET in all sorts of software from operating systems, to developer tools, to Office&lt;/a&gt;.&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;em&gt;&lt;font color="#808080"&gt;Microsoft's current operating systems, XP and Windows 2003, do not depend on .NET; and with XP, .NET is an optional component.&lt;/font&gt;&lt;/em&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;My Response&lt;/strong&gt;: This is a half-truth at best. While Windows XP Professional does not use the .NET Framework,&amp;nbsp;that's because the .NET Framework was released after Windows XP Professional shipped. Let's look at the operating systems that shipped after the .NET Framework was released:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Windows XP Media Center edition &lt;strong&gt;&lt;font color="#ff0000"&gt;requires&lt;/font&gt; &lt;/strong&gt;the .NET Framework for MCE-specific applications.&lt;/li&gt; &lt;li&gt;Windows XP Professional Tablet PC Edition &lt;strong&gt;&lt;font color="#ff0000"&gt;requires&lt;/font&gt; &lt;/strong&gt;the .NET Framework for handwriting recognition which is a managed application.&lt;/li&gt; &lt;li&gt;Windows Server 2003 &lt;strong&gt;&lt;font color="#ff0000"&gt;requires&lt;/font&gt;&lt;/strong&gt; the .NET Framework to use ASP.NET, UDDI Services, or Sharepoint Team Services.&lt;/li&gt; &lt;li&gt;Windows Small Business Server 2003 &lt;font color="#ff0000"&gt;&lt;strong&gt;requires&lt;/strong&gt;&lt;/font&gt; the .NET Framework for ASP.NET as do SBS specific applications like&amp;nbsp;Remote Web Workplace, and the Backup Snap-in.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;On Longhorn and the death of browser applications&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;em&gt;&lt;font color="#808080"&gt;RG: My opinion is that Avalon, or more specifically, XAML, will mark the death of ASP. The reason is that Avalon is a client-side technology, but the browser is an important part of the distribution model. XAML is so rich that a browser-contained XAML application will look no different to a process-based Avalon application, and coupled with Web Services or Indigo (as the mechanism to access remote code), an XAML application will make an ASP.NET application look paltry and antiquated. Why would Microsoft want to kill ASP? Well, with installation of ASP.NET Microsoft sells a single copy of Windows 2003 and perhaps a handful of copies of Visual Studio.NET. The clients don't have to be Windows, so there is no extra sale to Microsoft (whether as a product or licence). This is hardly a great revenue generator, and worse, ASP.NET actually makes it easy to write the application so that it can be used by browsers other than IE.&lt;/font&gt; &lt;/em&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;My Reponse&lt;/strong&gt;: I respectfully disagree. XAML will allow for rich interfaces, but ASP.NET and HTML&amp;nbsp;are not going away. Our value&amp;nbsp;is that we can take the best of both worlds, and&amp;nbsp;provide an optimized experience&amp;nbsp;to XAML browsers while still maintaining compatibility with old computers. It should also be noted that there is a difference between client applications and server applications.&amp;nbsp;The server market itself is&amp;nbsp;*totally different* then the client/consumer market. While people talk about Microsoft's dominance in client operating systems at around 90%, we are nowhere near that number in the server market. We're competing against&amp;nbsp;products and companies like&amp;nbsp;IBM WebSphere, hundreds of middleware products, Oracle in the database market, etc. If we want to win the server market, we need to have the fastest, most reliable, most secure, most productive and affordable solution for creating Web applications. To say that browser applications are a threat to Microsoft is so....1996. &lt;strong&gt;The threat is not&amp;nbsp;the&amp;nbsp;Web&lt;/strong&gt;. If it was, wouldn't&amp;nbsp;Microsoft have "lost" already given that the Web is already incredibly successful and popular. How much more popular does the Web have to be before this is proven untrue?&amp;nbsp;Richard then goes on to say that Microsoft needs to do this because of client revenue. The client&amp;nbsp;operating system market, as stated above ~90%&amp;nbsp;is pretty saturated. The server market is where the opportunity for revenue growth truly lies&amp;nbsp;(PS the server and tool business &lt;a href="http://www.microsoft.com/msft/download/FY05/MSFTQ2-05.ppt" title="http://www.microsoft.com/msft/download/FY05/MSFTQ2-05.ppt"&gt;grew 18% last quarter! - see slide 9&lt;/a&gt;).&amp;nbsp;On the question of revenue, a typical server deal is in the thousands of dollars as you're paying for several parts including:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Operating Systems&lt;/li&gt; &lt;li&gt;Transaction Engine&lt;/li&gt; &lt;li&gt;Middleware &lt;/li&gt; &lt;li&gt;Database&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Depending on the complexity of the solution, this can range from thousands of dollars to several million dollars. Server products are expensive. If you look at the market for Web content-management solutions, the average price can be around $50,000 for a one-proc enterprise license. My point being that there are plenty of revenue opportunities and competitive threats from the likes of IBM and others&amp;nbsp;in the server market.&amp;nbsp;Do you know how&amp;nbsp;large the market for database software is in terms of revenue?&amp;nbsp;Would you agree that it's billions of dollars? Do you know that&amp;nbsp;Oracle is the #2 software company and their primary revenue is from databases? That's just *one* of the market opportunities&amp;nbsp;for server software. Back to my point - We are&amp;nbsp;totally committed to our server products and to making Windows Server and ASP.NET&amp;nbsp;the best platform for creating Web applications. Period.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;On Longhorn&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;em&gt;&lt;font color="#808080"&gt;RG: I take the decision to make Avalon available to other versions of Windows as a lack of confidence in the sales of Longhorn.&lt;/font&gt;&lt;/em&gt;&lt;/li&gt; &lt;li&gt;&lt;em&gt;&lt;font color="#808080"&gt;RG: However, Microsoft's announcement that Avalon will be available for other versions of Windows indicates to me that they are not so confident on the uptake of Longhorn, and developers will not write applications for Avalon if they are not convinced that there will be the clients that will run it. &lt;/font&gt;&lt;/em&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;My Reponse:&lt;/strong&gt; The decision to make Avalon available to other versions of Windows was driven by one thing, customer demand. Any rudimentary Web search turns up results of customers complaining about not being able to have this functionality on down-level operating systems.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;On using the .NET Framework for shipping products&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;em&gt;&lt;font color="#808080"&gt;RG: So, with the announcements they have made last year, Microsoft has indicated that Longhorn will not be the great .NET innovation that we were lead to believe it was from PDC 2003. This indicates to me that Microsoft is losing confidence in .NET.&lt;/font&gt;&amp;nbsp;&lt;/em&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;My Reponse: &lt;/strong&gt;Richard, the key parts of Longhorn you've mentioned in your article, &lt;strong&gt;Avalon and Indigo, are written in managed code&lt;/strong&gt;. How does that indicate we are losing confidence in .NET when we've decided to bet the success of our next operating system on the .NET Framework? You might then make the follow up&amp;nbsp;argument that because the entire operating system isn't managed, that we have "lost confidence". While that's your opinion, I don't think managed code is right for every scenario and Microsoft has never claimed that it is. Microsoft still fully supports C/C++ and we have a very large existing C/C++ code base and C++ customer constiuency.&amp;nbsp;We'll use managed code where it makes sense. &lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;em&gt;&lt;font color="#808080"&gt;RG: The framework has become Visual Basic—it's intended for users to develop applications, but not for Microsoft to create operating systems or the revenue generating products that they base their profits on.&lt;/font&gt;&lt;/em&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;My Response&lt;/strong&gt;:&amp;nbsp;I'll avoid responding to the VB bashing as someone&amp;nbsp;is already working on that. There are two points here, one is&amp;nbsp;using the&amp;nbsp;.NET Framework for creating operating systems, the other&amp;nbsp;on&amp;nbsp;Microsoft revenue. On creating operating systems using the&amp;nbsp;.NET Framework, I don't think we've *ever* said that you should be creating an operating system from scratch based solely on managed code. The truth is, gasp,&amp;nbsp;the vast majority of&amp;nbsp;our customers are not creating operating systems.&amp;nbsp;&amp;nbsp;For those customers who are or who need that level of control and performance,&amp;nbsp;we have C/C++ and we absolutely have not abandoned that. On revenue generating profits, I've already listed several &lt;A href="http://blogs.msdn.com/danielfe/archive/2004/11/02/251254.aspx" title="http://blogs.msdn.com/danielfe/archive/2004/11/02/251254.aspx"&gt;revenue generating applications using&amp;nbsp;the .NET Framework&lt;/a&gt;. Microsoft is divided into the seven business groups&amp;nbsp;listed below and let's&amp;nbsp;see which ones are using managed code.&amp;nbsp;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Client - Check&lt;/li&gt; &lt;li&gt;Information Worker - Check&lt;/li&gt; &lt;li&gt;Server &amp;amp; Tools - Check &lt;/li&gt; &lt;li&gt;Home and Entertainment - Check&lt;/li&gt; &lt;li&gt;MSN - Check&lt;/li&gt; &lt;li&gt;MBS - Check&lt;/li&gt; &lt;li&gt;Mobile and Embedded Devices - Check&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;I hope this clears up and FUD, half-truths and any misconceptions on managed code. If something is incorrect here, please let me know!&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src ="http://weblogs.asp.net/danielfe/aggbug/378343.aspx" width = "1" height = "1" /&gt;	&lt;p class="ngrelatedlinks" align="right"&gt;&lt;a href="http://services.newsgator.com/subscriber/Related.aspx?relurl=http%3a%2f%2fweblogs.asp.net%2fdanielfe%2farchive%2f2005%2f02%2f22%2f378343.aspx"&gt;			Related...		&lt;/a&gt;&lt;/p&gt;&lt;p class="ngpostlinks"&gt;&lt;a href="http://weblogs.asp.net/danielfe/archive/2005/02/22/378343.aspx"&gt;http://weblogs.asp.net/danielfe/archive/2005/02/22/378343.aspx&lt;/a&gt;&amp;nbsp; | &amp;nbsp;&lt;a href="http://weblogs.asp.net/danielfe/archive/2005/02/22/378343.aspx#comment"&gt;Comments&lt;/a&gt;&lt;/p&gt;&lt;/div&gt; &lt;img src ="http://www.tourneylogic.com/Blogs/links/aggbug/385.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>