<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/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Viktor Bergman</title>
        <link>http://geekswithblogs.net/viktorbergman/Default.aspx</link>
        <description>.Net für alles</description>
        <language>sv</language>
        <copyright>Viktor Bergman</copyright>
        <managingEditor>viktor.bergman@celab.se</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <image>
            <title>Viktor Bergman</title>
            <url>http://geekswithblogs.net/images/RSS2Image.gif</url>
            <link>http://geekswithblogs.net/viktorbergman/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>Importing VS2005 projects into Visual Studio 2008</title>
            <category>Visual Studio</category>
            <link>http://geekswithblogs.net/viktorbergman/archive/2007/11/23/Importing-VS2005-projects-into-Visual-Studio-2008.aspx</link>
            <description>&lt;p&gt;Installed Visual Studio 2008 yesterday and it so far it seems to reach my expectations. Im looking forward to playing with all these new things; LINQ, anonymous types etc. However I got really dazzled to why my imported .NET 2.0 projects from Visual Studio 2005 behaved REALLY slow in 2008. I could hardly edit any code and loading the designer took forever. By re-creating the project from scratch and import the old files it now works as usual. 
&lt;/p&gt;&lt;p&gt;Perhaps anyone knows the cause of this behavior?&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=117063"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=117063" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/viktorbergman/aggbug/117063.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Viktor Bergman</dc:creator>
            <guid>http://geekswithblogs.net/viktorbergman/archive/2007/11/23/Importing-VS2005-projects-into-Visual-Studio-2008.aspx</guid>
            <pubDate>Fri, 23 Nov 2007 10:24:49 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/viktorbergman/comments/117063.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/viktorbergman/archive/2007/11/23/Importing-VS2005-projects-into-Visual-Studio-2008.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/viktorbergman/comments/commentRss/117063.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/viktorbergman/services/trackbacks/117063.aspx</trackback:ping>
        </item>
        <item>
            <title>Maintaining treeview state across pages</title>
            <category>VB.Net</category>
            <link>http://geekswithblogs.net/viktorbergman/archive/2007/11/12/Maintaining-treeview-state-across-pages.aspx</link>
            <description>&lt;p&gt;The TreeView control in ASP.NET 2.0 is one of my favourite controls for building easy-to-use navigation. But it has some limitations, or at least they appear to me as limitiations. The problem is to maintain the state of the nodes when jumping around pages, especially in an masterpage based UI.
&lt;/p&gt;&lt;p&gt;So this is the task. I am using the Treeview to present product categories in hierarchy with an unlimited amount of childnodes. I am not interested in using the postback method with javascript as it will not be search-engine friendly. So what I need to do is to find some way to use NavigationUrl and still maintain the state of the tree without using viewstate or javascript.
&lt;/p&gt;&lt;p&gt;&lt;strong&gt;To begin with I pass the ValuePath as a querystring for NavigateUrl of each Node.&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;Protected&lt;/span&gt;
			&lt;span style="color:blue"&gt;Sub&lt;/span&gt; MyTree_TreeNodeDataBound(&lt;span style="color:blue"&gt;ByVal&lt;/span&gt; sender &lt;span style="color:blue"&gt;As&lt;/span&gt;
			&lt;span style="color:blue"&gt;Object&lt;/span&gt;, &lt;span style="color:blue"&gt;ByVal&lt;/span&gt; e &lt;span style="color:blue"&gt;As&lt;/span&gt; System.Web.UI.WebControls.TreeNodeEventArgs) &lt;span style="color:blue"&gt;Handles&lt;/span&gt; MyTree.TreeNodeDataBound
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;e.Node.NavigateUrl &amp;amp;= &lt;span style="color:#a31515"&gt;"&amp;amp;path="&lt;/span&gt; &amp;amp; e.Node.ValuePath
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;End&lt;/span&gt;
			&lt;span style="color:blue"&gt;Sub&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;This will make my URLS look something like: /showcategory.aspx?category=123&amp;amp;path=Computers|Laptops|Accessories
&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Secondly, in the Page_Load event I must parse my Path parameter and expand each node:&lt;br /&gt;&lt;/strong&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;Private&lt;/span&gt;
			&lt;span style="color:blue"&gt;Sub&lt;/span&gt; ExpandTreenodeItem(&lt;span style="color:blue"&gt;ByVal&lt;/span&gt; path &lt;span style="color:blue"&gt;As&lt;/span&gt;
			&lt;span style="color:blue"&gt;String&lt;/span&gt;)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;
			&lt;span style="color:blue"&gt;If&lt;/span&gt;
			&lt;span style="color:blue"&gt;Not&lt;/span&gt; path = &lt;span style="color:blue"&gt;String&lt;/span&gt;.Empty &lt;span style="color:blue"&gt;Then
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;
			&lt;span style="color:blue"&gt;Dim&lt;/span&gt; strPath() &lt;span style="color:blue"&gt;As&lt;/span&gt;
			&lt;span style="color:blue"&gt;String&lt;/span&gt; = path.Split("|")
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;
			&lt;span style="color:blue"&gt;Dim&lt;/span&gt; strBuildPath &lt;span style="color:blue"&gt;As&lt;/span&gt;
			&lt;span style="color:blue"&gt;String
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;
			&lt;span style="color:blue"&gt;Dim&lt;/span&gt; n &lt;span style="color:blue"&gt;As&lt;/span&gt; TreeNode
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;
			&lt;span style="color:blue"&gt;For&lt;/span&gt;
			&lt;span style="color:blue"&gt;Each&lt;/span&gt; leaf &lt;span style="color:blue"&gt;As&lt;/span&gt;
			&lt;span style="color:blue"&gt;String&lt;/span&gt;
			&lt;span style="color:blue"&gt;In&lt;/span&gt; strPath
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;
			&lt;span style="color:blue"&gt;If&lt;/span&gt; strBuildPath = &lt;span style="color:blue"&gt;String&lt;/span&gt;.Empty &lt;span style="color:blue"&gt;Then&lt;/span&gt; strBuildPath = leaf &lt;span style="color:blue"&gt;Else&lt;/span&gt; strBuildPath &amp;amp;= "|" &amp;amp; leaf
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;                n = MyTree.FindNode(strBuildPath)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;
			&lt;span style="color:blue"&gt;If&lt;/span&gt;
			&lt;span style="color:blue"&gt;Not&lt;/span&gt; n &lt;span style="color:blue"&gt;Is&lt;/span&gt;
			&lt;span style="color:blue"&gt;Nothing&lt;/span&gt;
			&lt;span style="color:blue"&gt;Then&lt;/span&gt; n.Expand()
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;                n = &lt;span style="color:blue"&gt;Nothing
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;
			&lt;span style="color:blue"&gt;Next
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;
			&lt;span style="color:blue"&gt;End&lt;/span&gt;
			&lt;span style="color:blue"&gt;If
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;End&lt;/span&gt;
			&lt;span style="color:blue"&gt;Sub&lt;br /&gt;&lt;br /&gt;Protected&lt;/span&gt;
			&lt;span style="color:blue"&gt;Sub&lt;/span&gt; MyTree_DataBound(&lt;span style="color:blue"&gt;ByVal&lt;/span&gt; sender &lt;span style="color:blue"&gt;As&lt;/span&gt;
			&lt;span style="color:blue"&gt;Object&lt;/span&gt;, &lt;span style="color:blue"&gt;ByVal&lt;/span&gt; e &lt;span style="color:blue"&gt;As&lt;/span&gt; System.EventArgs) &lt;span style="color:blue"&gt;Handles&lt;/span&gt; MyTree.DataBound
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;
			&lt;span style="color:blue"&gt;If&lt;/span&gt;
			&lt;span style="color:blue"&gt;Not&lt;/span&gt; Request.QueryString(&lt;span style="color:#a31515"&gt;"path"&lt;/span&gt;) = &lt;span style="color:#a31515"&gt;""&lt;/span&gt;
			&lt;span style="color:blue"&gt;Then
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;            ExpandTreenodeItem(Request.QueryString(&lt;span style="color:#a31515"&gt;"path"&lt;/span&gt;))
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;
			&lt;span style="color:blue"&gt;End&lt;/span&gt;
			&lt;span style="color:blue"&gt;If
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;End&lt;/span&gt;
			&lt;span style="color:blue"&gt;Sub&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;The trick is to make the Path shorter and shorter and move all the way up to the root and expand at each level (first expand Computers, then expand Computers|Laptops and last expand Computers|Laptops|Accessories.
&lt;/p&gt;&lt;p&gt;One might also consider expanding nodes with the Path parameter coming from another source, perhaps from a product view page where you have the categorization stored within the product object.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=116790"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=116790" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/viktorbergman/aggbug/116790.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Viktor Bergman</dc:creator>
            <guid>http://geekswithblogs.net/viktorbergman/archive/2007/11/12/Maintaining-treeview-state-across-pages.aspx</guid>
            <pubDate>Mon, 12 Nov 2007 12:07:21 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/viktorbergman/comments/116790.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/viktorbergman/archive/2007/11/12/Maintaining-treeview-state-across-pages.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/viktorbergman/comments/commentRss/116790.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/viktorbergman/services/trackbacks/116790.aspx</trackback:ping>
        </item>
        <item>
            <title>Surface computing from Pixel Perspective</title>
            <link>http://geekswithblogs.net/viktorbergman/archive/2007/06/01/Surface-computing-from-Pixel-Perspective.aspx</link>
            <description>With the upcoming release of Microsoft Surface the term surface computing is getting really hot. &lt;br /&gt;
I just saw this demo from a NYU spinoff called Perceptive Pixel, they demonstrate their technology that pretty much resembles Microsoft Surface&lt;br /&gt;
&lt;br /&gt;
&lt;embed width="486" height="322" src="http://services.brightcove.com/services/viewer/federated_f8/713271701" bgcolor="#000000" flashvars="playerId=713271701&amp;amp;viewerSecureGatewayURL=https://services.brightcove.com/services/amfgateway&amp;amp;servicesURL=http://services.brightcove.com/services&amp;amp;cdnURL=http://admin.brightcove.com&amp;amp;domain=embed&amp;amp;autoStart=false&amp;amp;" base="http://admin.brightcove.com" name="flashObj" seamlesstabbing="false" type="application/x-shockwave-flash" swliveconnect="true" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"&gt;&lt;/embed&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Good resources about Surface Computing, i.e awesome demos ;-):&lt;/span&gt;&lt;br /&gt;
&lt;a href="http://www.microsoft.com/surface/"&gt;Go to the productsite for Microsoft Surface and take a look on the cool videos.&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.perceptivepixel.com"&gt;Perceptivepixel.com&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://research.microsoft.com/~awilson/"&gt;Andy Wilsons webpage, the guy behind "Play Anywhere"&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://channel9.msdn.com/Showpost.aspx?postid=290587"&gt;Rory at Channel9 goes crazy with Play Anywhere&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=112907"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=112907" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/viktorbergman/aggbug/112907.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Viktor Bergman</dc:creator>
            <guid>http://geekswithblogs.net/viktorbergman/archive/2007/06/01/Surface-computing-from-Pixel-Perspective.aspx</guid>
            <pubDate>Fri, 01 Jun 2007 07:40:34 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/viktorbergman/comments/112907.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/viktorbergman/archive/2007/06/01/Surface-computing-from-Pixel-Perspective.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/viktorbergman/comments/commentRss/112907.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/viktorbergman/services/trackbacks/112907.aspx</trackback:ping>
        </item>
        <item>
            <title>A nice trick when you run out connections in the SqlClient pool</title>
            <category>VB.Net</category>
            <link>http://geekswithblogs.net/viktorbergman/archive/2007/05/13/A-nice-trick-when-you-run-out-connections-in-the.aspx</link>
            <description>&lt;p&gt;Connection pooling is a great feature in the native SqlClient connector. For you who have not heard about it here's an introduction. Which you can obviously skip if you've heard about it ;-): 
&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SQL Connections are an expensive resource&lt;br /&gt;&lt;/strong&gt;Based on your connection string SqlClient will connect to a given Microsoft SQL Server using sockets, named pipes or whatever. This is an un-managed resource which means that it must be explicitly opened and closed; this &lt;strong&gt;has to be done&lt;/strong&gt; since the server has a limit for how many connections you can keep alive at once. This pretty much depends on the physical limitations of the server; memory, CPU etc. 
&lt;/p&gt;&lt;p&gt;During the lifetime of your request you might have several connections opened and closed to the server. Under the covers this takes some time. The client must establish a TCP/IP connection to the server, handshake, authenticate etc. 
&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SqlClient keeps a "managed" pool of connections by default &lt;br /&gt;&lt;/strong&gt;When pooling is enabled your code does not immediately connect to the SQL Server instead it attempts to get a connection from a pool of connections. When you call the Close() the connection will be returned to the pool, ready to be used by the next request. The maximum number of available connections held by the pool is determined in your connection string, by default it is set to 100. This is the absolute MAXIMUM of simultaneous connections that your app can handle, if all these connections are "leased" at the moment the client has to wait (Connection Time Out, default 15 seconds) until one becomes free. When the timeout expires the client will be greeted by this nightmare exception: 
&lt;/p&gt;&lt;p&gt;&lt;em&gt;Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached. &lt;/em&gt;
	&lt;/p&gt;&lt;p&gt;When this happens there is really not much more to do but wait and hope that the garbage collector will invoke Dispose on the SqlConnection object and close the connection, however this is not guaranteed and can take some time. 
&lt;/p&gt;&lt;p&gt;You must always call Close() on all your SqlConnection objects, no matter if you are using pooling or not. Always close it before the object goes out of scope, if it does happens you will have a connection leak that you cannot heal from. 
&lt;/p&gt;&lt;p&gt;&lt;strong&gt;So, the trick then &lt;br /&gt;&lt;/strong&gt;My experience is that once the pool is filled up, and if the timeout expires there is really nothing else to do but create a completely new non-pooled connection for the request. This approach will make sure that you will never have connection pool overflows; the next thing that can go wrong here is if the server itself denies the connection. That is a risk I am willing to take, however SQL Server 2005 has a limit of some 32,767 simultaneous connections so as long as my connections are CLOSED I will not have a problem ( wink wink ;-) ). 
&lt;/p&gt;&lt;p&gt;Firstly I have to almost identical connection strings in web.config, one default with pooling enabled and one without pooling: 
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;add&lt;/span&gt;&lt;span style="color:blue"&gt;
			&lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;"&lt;span style="color:blue"&gt;PRIMARY&lt;/span&gt;"&lt;span style="color:blue"&gt;
			&lt;/span&gt;&lt;span style="color:red"&gt;connectionString&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;"&lt;span style="color:blue"&gt;Data Source=VIB\SQLEXPRESS;Initial Catalog=TestPoolingDB;Integrated Security=True;Connect Timeout=5;&lt;/span&gt; "&lt;span style="color:blue"&gt;
			&lt;/span&gt;&lt;span style="color:red"&gt;providerName&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;"&lt;span style="color:blue"&gt;System.Data.SqlClient&lt;/span&gt;"&lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;add&lt;/span&gt;&lt;span style="color:blue"&gt;
			&lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;"&lt;span style="color:blue"&gt;PRIMARY_NOPOOL&lt;/span&gt;"&lt;span style="color:blue"&gt;
			&lt;/span&gt;&lt;span style="color:red"&gt;connectionString&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;"&lt;span style="color:blue"&gt;Data Source=VIB\SQLEXPRESS;Initial Catalog=TestPoolingDB;Integrated Security=True;Pooling=False&lt;/span&gt;"&lt;span style="color:blue"&gt;
			&lt;/span&gt;&lt;span style="color:red"&gt;providerName&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;"&lt;span style="color:blue"&gt;System.Data.SqlClient&lt;/span&gt;"&lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;As you can see in the PRIMARY connection SqlClient is instructed to time out if a connection is not delivered within 5 seconds. 
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;Dim&lt;/span&gt; connection &lt;span style="color:blue"&gt;As&lt;/span&gt; SqlConnection &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="color:blue; font-family:Courier New; font-size:9pt"&gt;Try &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;connection = &lt;span style="color:blue"&gt;New&lt;/span&gt; SqlConnection(System.Configuration.ConfigurationManager.&lt;br /&gt;ConnectionStrings(&lt;span style="color:#a31515"&gt;"PRIMARY"&lt;/span&gt;).ConnectionString) &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;connection.Open() &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;Catch&lt;/span&gt; ex &lt;span style="color:blue"&gt;As&lt;/span&gt; System.InvalidOperationException &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;connection = &lt;span style="color:blue"&gt;New&lt;/span&gt; SqlConnection(System.Configuration.ConfigurationManager.&lt;br /&gt;ConnectionStrings(&lt;span style="color:#a31515"&gt;"PRIMARY_NOPOOL"&lt;/span&gt;).ConnectionString) &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;connection.Open() &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:green"&gt;'Save a logentry on this since it is not normal behavior.&lt;/span&gt;
		&lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;End&lt;/span&gt;
			&lt;span style="color:blue"&gt;Try &lt;/span&gt;&lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;br /&gt;Correct me If I am wrong here but this seems like a solid solution, even if you have potential connectionleaks within your code this will buy you some time in the production environment… as long as you keep a log of the situations where the non-pooled fallback is required. 
&lt;/p&gt;&lt;p&gt;Comments and feedback on this is highly welcomed.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=112456"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=112456" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/viktorbergman/aggbug/112456.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Viktor Bergman</dc:creator>
            <guid>http://geekswithblogs.net/viktorbergman/archive/2007/05/13/A-nice-trick-when-you-run-out-connections-in-the.aspx</guid>
            <pubDate>Sun, 13 May 2007 11:50:17 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/viktorbergman/comments/112456.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/viktorbergman/archive/2007/05/13/A-nice-trick-when-you-run-out-connections-in-the.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/viktorbergman/comments/commentRss/112456.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/viktorbergman/services/trackbacks/112456.aspx</trackback:ping>
        </item>
        <item>
            <title>Detecting overlapping datetime ranges</title>
            <category>VB.Net</category>
            <link>http://geekswithblogs.net/viktorbergman/archive/2007/04/26/Detecting-overlapping-datetime-ranges.aspx</link>
            <description>&lt;p&gt;So, I was working on this method for detecting overlapping time periods for approx 11 hours. The objective was at first simple: take two timeranges and compare them. If they overlap then shout out loud, if not swallow and get on with your miserable life. I must say that this was MUCH more complex than I first thought. You cannot simply check if (dtmOrigEnd &amp;gt; dtmNewStart ) And (dtmOrigStart  &amp;lt; dtmNewEnd ). What happens if the new startdate actually is lower than the old startdate, aswell as the new startdate?
&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Example 1:
&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;Dim&lt;/span&gt; dtmOrigStart &lt;span style="color:blue"&gt;As&lt;/span&gt; DateTime = &lt;span style="color:#a31515"&gt;"2007-04-17 17:14:00"
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;Dim&lt;/span&gt; dtmOrigEnd &lt;span style="color:blue"&gt;As&lt;/span&gt; DateTime = &lt;span style="color:#a31515"&gt;"2007-04-26 19:00:00"
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;Dim&lt;/span&gt; dtmNewStart &lt;span style="color:blue"&gt;As&lt;/span&gt; DateTime = &lt;span style="color:#a31515"&gt;"2007-04-12 20:14:00"
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;Dim&lt;/span&gt; dtmNewEnd &lt;span style="color:blue"&gt;As&lt;/span&gt; DateTime = &lt;span style="color:#a31515"&gt;"2007-04-29 19:00:00"
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;If&lt;/span&gt; (dtmOrigStart &amp;gt; dtmNewStart) &lt;span style="color:blue"&gt;And&lt;/span&gt; (dtmOrigEnd &amp;lt; dtmNewEnd) &lt;span style="color:blue"&gt;Then
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 28pt"&gt;&lt;span style="color:blue; font-family:Courier New; font-size:9pt"&gt;Console.writeline("OVERLAP!!")
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;End&lt;/span&gt;
			&lt;span style="color:blue"&gt;If
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Well so far it seems OK, the new endDate is larger than the old one. So we have a collision. Just as I want it to be.
&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Example 2 where it becomes tricky:
&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;Dim&lt;/span&gt; dtmOrigStart &lt;span style="color:blue"&gt;As&lt;/span&gt; DateTime = &lt;span style="color:#a31515"&gt;"2007-04-17 17:14:00"
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;Dim&lt;/span&gt; dtmOrigEnd &lt;span style="color:blue"&gt;As&lt;/span&gt; DateTime = &lt;span style="color:#a31515"&gt;"2007-04-26 19:00:00"
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;Dim&lt;/span&gt; dtmNewStart &lt;span style="color:blue"&gt;As&lt;/span&gt; DateTime = &lt;span style="color:#a31515"&gt;"2007-04-15 20:14:00"
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;Dim&lt;/span&gt; dtmNewEnd &lt;span style="color:blue"&gt;As&lt;/span&gt; DateTime = &lt;span style="color:#a31515"&gt;"2007-04-25 19:00:00"
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;If&lt;/span&gt; (dtmOrigStart &amp;gt; dtmNewStart) &lt;span style="color:blue"&gt;And&lt;/span&gt; (dtmOrigEnd &amp;lt; dtmNewEnd) &lt;span style="color:blue"&gt;Then
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 28pt"&gt;&lt;span style="color:blue; font-family:Courier New; font-size:9pt"&gt;Console.writeline("OVERLAP!!")
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;End&lt;/span&gt;
			&lt;span style="color:blue"&gt;If
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;This will &lt;span style="text-decoration:underline"&gt;not&lt;/span&gt; result as an overlap. The new endDate is smaller than the old one, but the startdates are further back in time.&lt;br /&gt;&lt;br /&gt;Sequences of days in this case:
&lt;/p&gt;&lt;div&gt;&lt;table style="border-collapse:collapse" border="0"&gt;&lt;colgroup&gt;&lt;col style="width:113px" /&gt;&lt;col style="width:29px" /&gt;&lt;col style="width:29px" /&gt;&lt;col style="width:29px" /&gt;&lt;col style="width:38px" /&gt;&lt;col style="width:29px" /&gt;&lt;col style="width:38px" /&gt;&lt;col style="width:29px" /&gt;&lt;col style="width:38px" /&gt;&lt;col style="width:29px" /&gt;&lt;col style="width:38px" /&gt;&lt;col style="width:38px" /&gt;&lt;col style="width:38px" /&gt;&lt;/colgroup&gt;&lt;tbody valign="top"&gt;&lt;tr style="background: white"&gt;&lt;td style="padding-left: 7px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  solid black 0.5pt; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;FIRST RANGE&lt;/p&gt;&lt;/td&gt;&lt;td style="padding-left: 7px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt; &lt;/td&gt;&lt;td style="padding-left: 7px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt; &lt;/td&gt;&lt;td style="padding-left: 7px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;17&lt;/p&gt;&lt;/td&gt;&lt;td style="padding-left: 7px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;18&lt;/p&gt;&lt;/td&gt;&lt;td style="padding-left: 7px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;19&lt;/p&gt;&lt;/td&gt;&lt;td style="padding-left: 7px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;20&lt;/p&gt;&lt;/td&gt;&lt;td style="padding-left: 7px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;21&lt;/p&gt;&lt;/td&gt;&lt;td style="padding-left: 7px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;22&lt;/p&gt;&lt;/td&gt;&lt;td style="padding-left: 7px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;23&lt;/p&gt;&lt;/td&gt;&lt;td style="padding-left: 7px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;24&lt;/p&gt;&lt;/td&gt;&lt;td style="padding-left: 7px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;25&lt;/p&gt;&lt;/td&gt;&lt;td style="padding-left: 7px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;26&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="background: white; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid black 0.5pt; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;SECOND RANGE&lt;/p&gt;&lt;/td&gt;&lt;td style="background: white; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;15&lt;/p&gt;&lt;/td&gt;&lt;td style="background: white; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;16&lt;/p&gt;&lt;/td&gt;&lt;td style="background: red; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;17&lt;/p&gt;&lt;/td&gt;&lt;td style="background: red; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;18&lt;/p&gt;&lt;/td&gt;&lt;td style="background: red; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;19&lt;/p&gt;&lt;/td&gt;&lt;td style="background: red; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;20&lt;/p&gt;&lt;/td&gt;&lt;td style="background: red; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;21&lt;/p&gt;&lt;/td&gt;&lt;td style="background: red; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;22&lt;/p&gt;&lt;/td&gt;&lt;td style="background: red; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;23&lt;/p&gt;&lt;/td&gt;&lt;td style="background: red; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;24&lt;/p&gt;&lt;/td&gt;&lt;td style="background: red; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;25&lt;/p&gt;&lt;/td&gt;&lt;td style="background: white; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;span style="font-size:9pt"&gt;&lt;em&gt;Days marked red are overlapping days.&lt;br /&gt;
			&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SOLUTION!
&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;I did not come up with the solution, I got close but mine ended up with 50 lines of pretty much IFs. I got tired of it and asked for help at forums.asp.net.&lt;br /&gt;These 6 lines of simple code work perfectly and were given to me by some guy called Tom Anker (thx!):
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;Private&lt;/span&gt;
			&lt;span style="color:blue"&gt;Function&lt;/span&gt; OverlappingPeriods(&lt;span style="color:blue"&gt;ByVal&lt;/span&gt; period1_start &lt;span style="color:blue"&gt;As&lt;/span&gt;
			&lt;span style="color:blue"&gt;Date&lt;/span&gt;, &lt;span style="color:blue"&gt;ByVal&lt;/span&gt; period1_end &lt;span style="color:blue"&gt;As&lt;/span&gt;
			&lt;span style="color:blue"&gt;Date&lt;/span&gt;, &lt;span style="color:blue"&gt;ByVal&lt;/span&gt; period2_start &lt;span style="color:blue"&gt;As&lt;/span&gt;
			&lt;span style="color:blue"&gt;Date&lt;/span&gt;, &lt;span style="color:blue"&gt;ByVal&lt;/span&gt; period2_end &lt;span style="color:blue"&gt;As&lt;/span&gt;
			&lt;span style="color:blue"&gt;Date&lt;/span&gt;)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;
			&lt;span style="color:blue"&gt;If&lt;/span&gt;
			&lt;span style="color:blue"&gt;Date&lt;/span&gt;.Compare(period1_start, period2_end) &amp;lt;= 0 &lt;span style="color:blue"&gt;And&lt;/span&gt;
			&lt;span style="color:blue"&gt;Date&lt;/span&gt;.Compare(period1_end, period2_start) &amp;gt;= 0 &lt;span style="color:blue"&gt;Then
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;
			&lt;span style="color:blue"&gt;Return&lt;/span&gt;
			&lt;span style="color:blue"&gt;True
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;
			&lt;span style="color:blue"&gt;End&lt;/span&gt;
			&lt;span style="color:blue"&gt;If
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;
			&lt;span style="color:blue"&gt;Return&lt;/span&gt;
			&lt;span style="color:blue"&gt;False
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:9pt"&gt;&lt;span style="color:blue"&gt;End&lt;/span&gt;
			&lt;span style="color:blue"&gt;Function&lt;/span&gt;&lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=111993"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=111993" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/viktorbergman/aggbug/111993.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Viktor Bergman</dc:creator>
            <guid>http://geekswithblogs.net/viktorbergman/archive/2007/04/26/Detecting-overlapping-datetime-ranges.aspx</guid>
            <pubDate>Wed, 25 Apr 2007 22:39:56 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/viktorbergman/comments/111993.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/viktorbergman/archive/2007/04/26/Detecting-overlapping-datetime-ranges.aspx#feedback</comments>
            <slash:comments>6</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/viktorbergman/comments/commentRss/111993.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/viktorbergman/services/trackbacks/111993.aspx</trackback:ping>
        </item>
        <item>
            <title>Shipment anxiety  </title>
            <category>Just thinking out loud</category>
            <category>Thoughts about working as a programmer</category>
            <link>http://geekswithblogs.net/viktorbergman/archive/2007/04/24/Shipment-anxiety.aspx</link>
            <description>&lt;p&gt;&lt;img src="http://blog.infocoresolutions.net/blogimages/042407_1819_Shipmentanx1.png" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;Tonight we are shipping the new RSBC (the national operations center)  for the Swedish Customs Service, which is a BIG system.&lt;br /&gt;I have developed, amongst other stuff on the system, mainly the Intranet and GPS localization systems. My first really huge delivery&lt;br /&gt;since I started here…so Im a BIT nervous right now. Hope everything will work out though.
&lt;/p&gt;&lt;p&gt;Not sure why Im blogging this, I should be down helping my colleagues…just had run up and fix some bugs and get some candy haha  :D&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=111943"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=111943" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/viktorbergman/aggbug/111943.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Viktor Bergman</dc:creator>
            <guid>http://geekswithblogs.net/viktorbergman/archive/2007/04/24/Shipment-anxiety.aspx</guid>
            <pubDate>Tue, 24 Apr 2007 04:19:03 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/viktorbergman/comments/111943.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/viktorbergman/archive/2007/04/24/Shipment-anxiety.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/viktorbergman/comments/commentRss/111943.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/viktorbergman/services/trackbacks/111943.aspx</trackback:ping>
        </item>
        <item>
            <title>Ricky Gervais at Microsoft</title>
            <link>http://geekswithblogs.net/viktorbergman/archive/2007/04/23/Ricky-Gervais-at-Microsoft.aspx</link>
            <description>&lt;object width="425" height="350"&gt;&lt;param name="movie" value="http://www.youtube.com/v/ugVRtth1e44" /&gt;&lt;param name="wmode" value="transparent" /&gt;&lt;embed src="http://www.youtube.com/v/ugVRtth1e44" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=111918"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=111918" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/viktorbergman/aggbug/111918.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Viktor Bergman</dc:creator>
            <guid>http://geekswithblogs.net/viktorbergman/archive/2007/04/23/Ricky-Gervais-at-Microsoft.aspx</guid>
            <pubDate>Mon, 23 Apr 2007 07:30:12 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/viktorbergman/comments/111918.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/viktorbergman/archive/2007/04/23/Ricky-Gervais-at-Microsoft.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/viktorbergman/comments/commentRss/111918.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/viktorbergman/services/trackbacks/111918.aspx</trackback:ping>
        </item>
        <item>
            <title>Overloading operators in VB.Net</title>
            <category>VB.Net</category>
            <category>OOP</category>
            <link>http://geekswithblogs.net/viktorbergman/archive/2007/04/16/Overloading-operators-in-VB.Net.aspx</link>
            <description>&lt;p&gt;Firstly I must note that this could mess things up pretty bad in your code so keep that in mind before getting all to excited.&lt;br /&gt;I am talking about custom operators for classes and structures, that if done with grace can help you a lot. I will begin with introducing the concept of operators first for those of you who might have forgotten about it and then I'll show you how to create your own. 
&lt;/p&gt;&lt;p&gt;&lt;strong&gt;What is an operator anyway?&lt;br /&gt;&lt;/strong&gt;The recognition of operators is universal, in maths as well as in programming. The typical operator takes two arguments and performs an operation on the two. E.g (1+1) and (strName2 = strName2), + and = are the operators in those cases. All operators perform either addition, subtraction, division, multiplication, modulus  or a comparative =, &amp;lt;&amp;gt;, &amp;lt;, &amp;gt;, &amp;lt;=, &amp;gt;= operator. Logical operators include OR, XOR, AND, NOT etc. 
&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Operators in .NET.&lt;br /&gt;&lt;/strong&gt;The means in which operators works in .net differ for each data type, for example + and – is not recognized for String but instead for numerics. All classes and structs you create on your own will only have support for comparative operators, and rarely the concative &amp;amp; operator. All types supports the logical operators though. What so great about the framework is that you can override these operators and implement your own that fits the nature of your own types.&lt;br /&gt;&lt;br /&gt;Let's define a class like this: 
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New"&gt;Public Class Vehicle &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New"&gt;Private strManufacturer As String &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New"&gt;Public Property Manufacturer As String&lt;br /&gt;Get&lt;br /&gt;return strManufacturer&lt;br /&gt;End Get&lt;br /&gt;Set(ByVal value as string)&lt;br /&gt;strManufacturer = value&lt;br /&gt;End Set&lt;br /&gt;End Property &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New"&gt;End Class &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;And write some simple code to compare those instances: 
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New"&gt;Dim ericsCar as New Vehicle&lt;br /&gt;ericsCar.Manufacturer = "Volvo" &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New"&gt;Dim sarahsCar as New Vehicle&lt;br /&gt;sarahsCar.Manufacturer = "Ford" &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New"&gt;If ericsCar = sarahsCar Then&lt;br /&gt;Console.WriteLine("You will never read this in your debugger since = is not defined for Vehicle.")&lt;br /&gt;Else&lt;br /&gt;Console.WriteLine("You lucky bastard.")&lt;br /&gt;End If &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;There is no = operator for the Vehicle class by default, instead we must use the Is operator which compares references, in other words &lt;em&gt;if ericsCar and sarahsCar shares the SAME object in memory&lt;/em&gt;. The comparison takes no concern if the two objects actually are logically equal vehicles.&lt;br /&gt;&lt;em&gt;(I could achieve the same goal by comparing the Manufacturer string property of the two objects…but that's not in favor of talking about custom operators so screw that :P).&lt;/em&gt;
	&lt;/p&gt;&lt;p&gt;Now; I think there are two aspects in this. Firstly, a good programmer never programs IN a language he programs INTO it. If something in the language doesn't meet his needs he will EXTEND it (this is in favor of overloading operators). Secondly, mixing with operators can be confusing for other developers because it's rarely done for complex types (you expect 1+1 to return 2 not 4). You rather tend to see it in more simple structs and low-level types. 
&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Implementing our own = operator for our Vehicle class &lt;/strong&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New"&gt;Public Class Vehicle &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New"&gt;Private strManufacturer As String &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New"&gt;Public Property Manufacturer As String&lt;br /&gt;Get&lt;br /&gt;return strManufacturer&lt;br /&gt;End Get&lt;br /&gt;Set(ByVal value as string)&lt;br /&gt;strManufacturer = value&lt;br /&gt;End Set&lt;br /&gt;End Property &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New"&gt;Public Shared Operator =(ByVal objVehicle1 as Vehicle, ByVal objVehicle2 as Vehicle) As Boolean&lt;br /&gt;If objVehicle1.Manufacturer.Equals(objVehicle2.Manufacturer)&lt;br /&gt;Return True&lt;br /&gt;Else&lt;br /&gt;Return False&lt;br /&gt;End If&lt;br /&gt;End Operator &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New"&gt;Public Shared Operator &amp;lt;&amp;gt;(ByVal objVehicle1 as Vehicle, ByVal objVehicle2 as Vehicle) As Boolean&lt;br /&gt;If Not objVehicle1.Manufacturer.Equals(objVehicle2.Manufacturer)&lt;br /&gt;Return True&lt;br /&gt;Else&lt;br /&gt;Return False&lt;br /&gt;End If&lt;br /&gt;End Operator &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New"&gt;End Class &lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;Now you can use = and &amp;lt;&amp;gt; for all your objects of the type Vehicle and you can evaluate them just as I want. You can even add arithmetic operators. 
&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Final word of caution&lt;br /&gt;&lt;/strong&gt;Overloaded operators can be helpful in situations where you want more control over your classes and structures and how they behave in your solution. But I would recommend you to be careful when implanting them. Make sure you return somewhat of an expected value (don't modify * to return a divison etc.) but with modifications more suitable for your needs. It is also useful to be more aware of operators in VB.net in general.&lt;strong&gt;
		&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=111724"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=111724" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/viktorbergman/aggbug/111724.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Viktor Bergman</dc:creator>
            <guid>http://geekswithblogs.net/viktorbergman/archive/2007/04/16/Overloading-operators-in-VB.Net.aspx</guid>
            <pubDate>Mon, 16 Apr 2007 19:42:28 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/viktorbergman/comments/111724.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/viktorbergman/archive/2007/04/16/Overloading-operators-in-VB.Net.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/viktorbergman/comments/commentRss/111724.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/viktorbergman/services/trackbacks/111724.aspx</trackback:ping>
        </item>
        <item>
            <title>The Discovery crew visited Gothenburg</title>
            <link>http://geekswithblogs.net/viktorbergman/archive/2007/04/15/The-Discovery-crew-visited-Gothenburg.aspx</link>
            <description>&lt;p&gt;Yesterday the Discovery crew launched the Science Festival in Gothenburg, mainly because Christer Fuglesang is a national hero here in Sweden. So the majority of the crew is travelling around Sweden for various seminars and interviews, I can't help myself wondering what the rest of the crew is thinking about the trip: P. For us Swedes he is a hero, but it is not like he's the only astronaut in the world…it's just a job like anything else. Except it is really hard to get the job :P. But I am big space fan, I just love it. I followed the mission on NASA TV here at work so it was pretty cool to see the guys that you just saw in space standing in front of you in our mall: D.
&lt;/p&gt;&lt;p&gt;Its funny how many teenagers reacted to their visit:
&lt;/p&gt;&lt;p&gt;"Who the fuck is he?"&lt;br /&gt;"I think it's Christer Fuglesang."&lt;br /&gt;"What has he done? Is he famous?"&lt;br /&gt;"No...he's just ugly"
&lt;/p&gt;&lt;p&gt;And this one:
&lt;/p&gt;&lt;p&gt; "Oh my god! Those are the people who went to the moon!"
&lt;/p&gt;&lt;p&gt;&lt;img src="http://blog.infocoresolutions.net/blogimages/041607_0650_TheDiscover1.jpg" alt="" /&gt;&lt;img src="http://blog.infocoresolutions.net/blogimages/041607_0650_TheDiscover2.jpg" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://blog.infocoresolutions.net/blogimages/041607_0650_TheDiscover3.jpg" alt="" /&gt;&lt;br /&gt;&lt;span style="font-size:8pt"&gt;Robert Curbeam, Mark Polansky, Nicholas Patrick, Joan Higginbotham and Christer Fuglesang.
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=111686"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=111686" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/viktorbergman/aggbug/111686.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Viktor Bergman</dc:creator>
            <guid>http://geekswithblogs.net/viktorbergman/archive/2007/04/15/The-Discovery-crew-visited-Gothenburg.aspx</guid>
            <pubDate>Sun, 15 Apr 2007 16:50:54 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/viktorbergman/comments/111686.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/viktorbergman/archive/2007/04/15/The-Discovery-crew-visited-Gothenburg.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/viktorbergman/comments/commentRss/111686.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/viktorbergman/services/trackbacks/111686.aspx</trackback:ping>
        </item>
        <item>
            <title>WPF/E beta released as Silverlight</title>
            <link>http://geekswithblogs.net/viktorbergman/archive/2007/04/15/WPFE-beta-released-as-Silverlight.aspx</link>
            <description>&lt;p&gt;Today Microsoft announced that WPF/E will be named Silverlight in the future. Honestly Windows Presentation Foundation / Everywhere is much cooler as a name, not that it really matters. &lt;br /&gt;&lt;img align="right" src="http://blog.infocoresolutions.net/blogimages/041607_0625_WPFEbetarel1.jpg" alt="" /&gt;I think Silverlight actually will be a strong competitor to Adobe Flash. It has some neater features unlike Flash, like native 3D support most of the WPF features that's come with XAML. Another strong reason is that Microsoft will push really hard on this, it would be kind of embarrassing for them to release another failure like ActiveX. 
&lt;/p&gt;&lt;p&gt;The tools for designing Silverlight aswell as regular WPF is young and not as complete as Adobes Flash environment (Expression Designer is still in beta I think) so they have a bit more miles to run on that area.&lt;br /&gt;&lt;br /&gt;Flash does not have a separate design / logic design, unlike Silverlight where you have your design in the XAML and your logic in separate (liiiight) CLR syntax. I think most interaction logic will be done with Microsoft AJAX and custom JavaScript as well as C# / VB.net. Flash has a weak form of C++ called ActionScript that's not even OO. However what's important in this context is that C# / VB.net should be used only for interaction logic, not business logic that you should have in a remote webservice or WCF. But for smaller apps I hope that the developer can produce some more complex logic and data access from within Silverlight. 
&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Blogs about Silverlight:
&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Joe Stegman's WebBlog &lt;a href="http://blogs.msdn.com/jstegman/"&gt;http://blogs.msdn.com/jstegman/&lt;/a&gt;&lt;br /&gt;Mike Harsh's Blog &lt;a href="http://blogs.msdn.com/mharsh/"&gt;http://blogs.msdn.com/mharsh/&lt;/a&gt;&lt;br /&gt;Sean Alexander's Blog &lt;a href="http://www.seanalexander.com/"&gt;http://www.seanalexander.com/&lt;/a&gt;&lt;br /&gt;Somasegar's WebLog &lt;a href="http://blogs.msdn.com/somasegar/"&gt;http://blogs.msdn.com/somasegar/&lt;/a&gt;&lt;br /&gt;Laurence Moroney's Blog Web.Next &lt;a href="http://blogs.msdn.com/webnext/"&gt;http://blogs.msdn.com/webnext/&lt;/a&gt;&lt;br /&gt;Tim Sneath's Blog &lt;a href="http://blogs.msdn.com/tims"&gt;http://blogs.msdn.com/tims&lt;/a&gt;&lt;br /&gt;Dave L. Campbell's Blog &lt;a href="http://www.wynapse.com/"&gt;http://www.wynapse.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Compiled from &lt;a href="http://weblogs.asp.net/mschwarz/"&gt;Michael Schwartz&lt;/a&gt; blog  (&lt;span style="font-size:9pt"&gt;just a comment on him…the guy is a fricken genious…german…but still genious :P)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=111685"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=111685" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/viktorbergman/aggbug/111685.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Viktor Bergman</dc:creator>
            <guid>http://geekswithblogs.net/viktorbergman/archive/2007/04/15/WPFE-beta-released-as-Silverlight.aspx</guid>
            <pubDate>Sun, 15 Apr 2007 16:25:57 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/viktorbergman/comments/111685.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/viktorbergman/archive/2007/04/15/WPFE-beta-released-as-Silverlight.aspx#feedback</comments>
            <slash:comments>5</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/viktorbergman/comments/commentRss/111685.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/viktorbergman/services/trackbacks/111685.aspx</trackback:ping>
        </item>
        <item>
            <title>I thought mainframes were dead</title>
            <category>Just thinking out loud</category>
            <category>Culture and history</category>
            <link>http://geekswithblogs.net/viktorbergman/archive/2007/04/14/I-thought-mainframes-were-dead.aspx</link>
            <description>&lt;p&gt;I have learned something new today (good god ;-)). I have always thought that mainframes were dying dinosaurs on its way out off the market; sure you have supercomputers (but are that really the same thing?). What's cool is that IBM is still manufacturing mainframes (like the Z System) and the demand is increasing incredibly especially in banking and other areas with a high demand of reliability, security and accuracy. 
&lt;/p&gt;&lt;p&gt;What is even COOLER than the fact that these giant machines are still in production is how they operate. Unlike PCs, or supercomputers for that matter, they are not built to do extreme processing but instead getting the job done rather fast. They pretty much just move data around. &lt;br /&gt;For example, when a transaction is started the job is sent through 2 pipelines and then compared. If the result does not match then the mainframe will try again and if it fails the second time as well the transaction will be moved to another processor, hence making it really reliable. The worst thing that can happen is not that the mainframe crashes but instead that everything will just go much slower. 
&lt;/p&gt;&lt;p&gt;The modern Z System from IBM can (and are) even operate on code from as far back as the 1960s. So .NET and Java have a lot of roadmiles to go before they can even be compared to Cobol. No matter how fast and versatile the modern systems may be the mainframes are still the back bone of our global economy.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=111648"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=111648" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/viktorbergman/aggbug/111648.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Viktor Bergman</dc:creator>
            <guid>http://geekswithblogs.net/viktorbergman/archive/2007/04/14/I-thought-mainframes-were-dead.aspx</guid>
            <pubDate>Sat, 14 Apr 2007 01:28:03 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/viktorbergman/comments/111648.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/viktorbergman/archive/2007/04/14/I-thought-mainframes-were-dead.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/viktorbergman/comments/commentRss/111648.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/viktorbergman/services/trackbacks/111648.aspx</trackback:ping>
        </item>
        <item>
            <title>Custom selectionbehaviour in Mozilla</title>
            <category>Clientside</category>
            <link>http://geekswithblogs.net/viktorbergman/archive/2007/04/13/111582.aspx</link>
            <description>&lt;p&gt;I found this cool Mozilla CSS modifier that allows you to change the style of textselection in a page ( hard to explain in English for a swede…but ya know when you left-click and select text :P…is there a real verb for it? :P).
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;*::-moz-selection {
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;    background-color:#FF3C00;
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;    color:white;
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;}&lt;br/&gt;
		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Don't know if there is an equivalent for Internet Explorer, but if you do…please give me a shout =)&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=111582"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=111582" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/viktorbergman/aggbug/111582.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Viktor Bergman</dc:creator>
            <guid>http://geekswithblogs.net/viktorbergman/archive/2007/04/13/111582.aspx</guid>
            <pubDate>Fri, 13 Apr 2007 07:42:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/viktorbergman/comments/111582.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/viktorbergman/archive/2007/04/13/111582.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/viktorbergman/comments/commentRss/111582.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/viktorbergman/services/trackbacks/111582.aspx</trackback:ping>
        </item>
        <item>
            <title>Referencetypes… for dummies</title>
            <category>Programming languages</category>
            <category>OOP</category>
            <link>http://geekswithblogs.net/viktorbergman/archive/2007/04/02/110605.aspx</link>
            <description>&lt;p&gt;As I've mentioned in an earlier post;  one of my aims with this blog is NOT to talk about really advanced topics but instead I will try and reach out to all you beginners. Surely I will write about advanced stuff as I go along but now it is MY blog so I will write whatever the heck I want to :D.
&lt;/p&gt;&lt;p&gt;So, &lt;strong&gt;referencetypes is the meal for the night&lt;/strong&gt;.&lt;br/&gt;The concept of referencetypes was fascinating for me back when I actually realized the definition of it, since it has such an impact on the quality of your code and how the whole "eco-system" works. Once you have begun to understand referencetypes and valuetypes, you will want to understand heap vs. stack and how the garbagecollector works. I can honestly say that I am still not 100 % on the heap vs. stack, but I'll get there :P.&lt;br/&gt;&lt;br/&gt;Let's start off by reading some code:
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New"&gt;Dim MyBitmap As New Bitmap(256, 256)&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;The &lt;span style="font-family:Courier New"&gt;New &lt;/span&gt;keyword creates a new instance of the object in the Heap, for which MyBitmap is a reference to. MyBitmap is &lt;span style="text-decoration:underline"&gt;not&lt;/span&gt; the object, it is a &lt;span style="text-decoration:underline"&gt;reference&lt;/span&gt;. Hence, the common exception "&lt;em&gt;Reference not set to an instance of an object&lt;/em&gt;" that you get from having references pointing to something that does not exist. &lt;br/&gt;What many programmers are afraid of, I've been there, is writing code like this:
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New"&gt;Dim MyBitmap As New Bitmap(256, 256)&lt;br/&gt;Dim MySecondBitmap as Bitmap = MyBitmap&lt;br/&gt;Dim MyThirdBitmap as Bitmap = MyBitmap
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Although there are three bitmap variables they are still exactly equal. If you go and change any value in MySecondBitmap you will have the same value in MyThirdBitmap since the variables are just references to something that you have created in memory. Having code like that would be completely meaningless since you only use a single object…but you get the idea :D.  A common scenario is when you are passing around objects to different methods and subclasses.
&lt;/p&gt;&lt;p&gt;Having this said, creating deeply nested relations to references and changing properties like crazy is often very errorprone. It is easy to think "&lt;em&gt;Hey I will have MySecondBitmap being the same as MyBitmap at first, but later I want to change MyBitmap since they cannot be the same since they have different names&lt;/em&gt;." &lt;br/&gt;Whilst there can be some stepping-in difficulties with this, as soon as you begin understand the flow of objects and references you will be able to write much better code where you utilize all your resources in an efficient way.
&lt;/p&gt;&lt;p&gt;So what parts in .net are referencetypes? Classes, Interfaces, Arrays and Collections are all referencetypes. Whereas integers, enums and structs are all valuetypes…the complete opposite. 
&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;More about that another time &lt;span style="font-family:Wingdings"&gt;J&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=110605"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=110605" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/viktorbergman/aggbug/110605.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Viktor Bergman</dc:creator>
            <guid>http://geekswithblogs.net/viktorbergman/archive/2007/04/02/110605.aspx</guid>
            <pubDate>Mon, 02 Apr 2007 17:08:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/viktorbergman/comments/110605.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/viktorbergman/archive/2007/04/02/110605.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/viktorbergman/comments/commentRss/110605.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/viktorbergman/services/trackbacks/110605.aspx</trackback:ping>
        </item>
        <item>
            <title>The ‘=’ operator vs. Equals() in VB.Net</title>
            <category>Programming languages</category>
            <category>VB.Net</category>
            <link>http://geekswithblogs.net/viktorbergman/archive/2007/03/26/109801.aspx</link>
            <description>&lt;p&gt;As I was reading yet another chapter in Code Complete Second Edition by Steve McConnell I started to think about the VB operator '=' versus the C equivalent '=='. Even though im a big VB fan I must say the C style is much better. In VB we use the same operator for two purposes, in one place we use it for ASSIGNING data and in another we use it for COMPARING data.
&lt;/p&gt;&lt;p&gt;However, I thought that why not use Equals(obj,1 obj2) instead of '=' for comparisons, if not only for the sake of maintaining a more consequent code. Further down that lane I started to wonder if there might be any pros or cons in regard to performance with the two. I have always that that Equals(obj1, obj2) just wraps a 'obj1 = obj2' statement. Daaah NOT ;-).
&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Here is my test case:
&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;Dim startTime As DateTime&lt;br/&gt;Dim endTime As DateTime
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;Dim strTestSubject1 As String = ".net is gooood...&lt;br/&gt;Dim strTestSubject2 As String = ".net is baaaaad..."
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;Dim i As Integer = 0
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;startTime = DateTime.Now
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;While i &amp;lt; 99999&lt;br/&gt;  If strTestSubject1 = strTestSubject2 Then&lt;br/&gt;  'If strTestSubject1.Equals(strTestSubject2)&lt;br/&gt;       'Do nothing&lt;br/&gt;  End If&lt;br/&gt; Console.WriteLine(i)&lt;br/&gt; i = i + 1&lt;br/&gt;End While&lt;br/&gt;endTime = DateTime.Now&lt;br/&gt;Console.WriteLine(vbCrLf &amp;amp; endTime.Subtract(startTime).TotalSeconds)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The results were not STUNNING but there is actually a difference:
&lt;/p&gt;&lt;div&gt;&lt;table style="border-collapse:collapse" border="0"&gt;&lt;colgroup&gt;&lt;col style="width:215px"/&gt;&lt;col style="width:215px"/&gt;&lt;/colgroup&gt;&lt;tbody valign="top"&gt;&lt;tr style="height: 20px"&gt;&lt;td style="padding-left: 7px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  solid black 0.5pt; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;&lt;span style="font-size:10pt"&gt;&lt;strong&gt;Using the = operator&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="padding-left: 7px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;&lt;span style="font-size:10pt"&gt;&lt;strong&gt;17,1143025 sec.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 20px"&gt;&lt;td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid black 0.5pt; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;&lt;span style="font-size:10pt"&gt;&lt;strong&gt;Using the Equals() function&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt"&gt;&lt;p&gt;&lt;span style="font-size:10pt"&gt;&lt;strong&gt;15,473205 sec.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br/&gt;The difference is about 1,6410975 seconds ( a rough estimate by just glancing the numbers ;-) ). It does not&lt;br/&gt;seem like a major difference but using the strTestSubject1.Equals(strTestSubject2)  is still 0.9 % faster.&lt;br/&gt;&lt;br/&gt;There seems to be a lot of discussion about this:&lt;br/&gt;&lt;a href="http://www.thecodingmonkey.net/CommentView.aspx?guid=112144590767701842"&gt;Nick Schweitzer posts a comparison on the both claiming that '=' uses old VB6 libraries…&lt;/a&gt;&lt;br/&gt;&lt;a href="http://addressof.com/blog/archive/2005/12/07/9298.aspx"&gt;Cory Smith rebuttals it in his post saying it does not…&lt;/a&gt;
	&lt;/p&gt;&lt;p&gt;Whatever the reason is, it sure seems like Equals IS faster.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=109801"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=109801" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/viktorbergman/aggbug/109801.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Viktor Bergman</dc:creator>
            <guid>http://geekswithblogs.net/viktorbergman/archive/2007/03/26/109801.aspx</guid>
            <pubDate>Mon, 26 Mar 2007 06:07:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/viktorbergman/comments/109801.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/viktorbergman/archive/2007/03/26/109801.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/viktorbergman/comments/commentRss/109801.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/viktorbergman/services/trackbacks/109801.aspx</trackback:ping>
        </item>
        <item>
            <title>Scott Guthrie on the new features of Orcas, a must read!</title>
            <category>Visual Studio</category>
            <link>http://geekswithblogs.net/viktorbergman/archive/2007/03/15/108858.aspx</link>
            <description>If anybody has missed it, Scott Gutrie has started to post a great series of posts about the new features of the Visual Studio Orcas release (planned to be released later this year).

&lt;a href="http://weblogs.asp.net/scottgu/archive/2007/03/13/new-orcas-language-feature-extension-methods.aspx" target="_blank"&gt;Here is a link to the last post about class extension methods&lt;/a&gt;, that BY FAR must be the coolest new feature yet have I have seen in Orcas.


&lt;a href="http://msdn2.microsoft.com/en-us/library/ms364068(VS.80).aspx#vb9overview_topic3"&gt;Some VB9 content about the stuff he mentions (in C#) can be found here.&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=108858"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=108858" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/viktorbergman/aggbug/108858.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Viktor Bergman</dc:creator>
            <guid>http://geekswithblogs.net/viktorbergman/archive/2007/03/15/108858.aspx</guid>
            <pubDate>Thu, 15 Mar 2007 07:05:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/viktorbergman/comments/108858.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/viktorbergman/archive/2007/03/15/108858.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/viktorbergman/comments/commentRss/108858.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/viktorbergman/services/trackbacks/108858.aspx</trackback:ping>
        </item>
    </channel>
</rss>