<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://dotnetfreak.co.uk/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Kevin Gearing&amp;#39;s Blog : Windows Forms .NET, ASP.NET</title><link>http://dotnetfreak.co.uk/blog/archive/tags/Windows+Forms+.NET/ASP.NET/default.aspx</link><description>Tags: Windows Forms .NET, ASP.NET</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP2 (Build: 20611.960)</generator><item><title>How to Donate</title><link>http://dotnetfreak.co.uk/blog/archive/2007/10/11/how-to-donate.aspx</link><pubDate>Thu, 11 Oct 2007 13:08:00 GMT</pubDate><guid isPermaLink="false">6329f370-38d9-4d4b-8419-567856985e22:1652</guid><dc:creator>dotNetFreak</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://dotnetfreak.co.uk/blog/rsscomments.aspx?PostID=1652</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://dotnetfreak.co.uk/blog/commentapi.aspx?PostID=1652</wfw:comment><comments>http://dotnetfreak.co.uk/blog/archive/2007/10/11/how-to-donate.aspx#comments</comments><description>&lt;P mce_keep="true"&gt;A few people have asked me recently how they actually donate for FormShield and I must admit it isn't exactly obvious. There is a PayPal button on the main FormShield article, but it is a bit buried!&lt;/P&gt;
&lt;P mce_keep="true"&gt;So, for anyone who would like to donate, here is the link:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;amp;business=dotnetfreak%40gmail%2ecom&amp;amp;item_name=dotNetFreak%20%2eNET%20Control%20Donations&amp;amp;no_shipping=1&amp;amp;cn=Comments&amp;amp;tax=0&amp;amp;currency_code=GBP&amp;amp;lc=GB&amp;amp;bn=PP%2dDonationsBF&amp;amp;charset=UTF%2d8" mce_href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;amp;business=dotnetfreak%40gmail%2ecom&amp;amp;item_name=dotNetFreak%20%2eNET%20Control%20Donations&amp;amp;no_shipping=1&amp;amp;cn=Comments&amp;amp;tax=0&amp;amp;currency_code=GBP&amp;amp;lc=GB&amp;amp;bn=PP%2dDonationsBF&amp;amp;charset=UTF%2d8"&gt;&lt;IMG src="http://www.paypal.com/en_US/i/btn/x-click-but04.gif" border=0 mce_src="http://www.paypal.com/en_US/i/btn/x-click-but04.gif"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Once your donation is received I will drop you an e-mail with a license key that removes the 'dotNetFreak.co.uk' adverts.&lt;/P&gt;
&lt;P mce_keep="true"&gt;This e-mail isn't sent automatically, and whilst I do endeavour to send them out the same day you donate, I'm not always able to do so, and on occasion it may take a couple of days before you receive your key!&lt;/P&gt;&lt;img src="http://dotnetfreak.co.uk/aggbug.aspx?PostID=1652" width="1" height="1"&gt;</description><category domain="http://dotnetfreak.co.uk/blog/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://dotnetfreak.co.uk/blog/archive/tags/Windows+Forms+.NET/default.aspx">Windows Forms .NET</category></item><item><title>FormShield and Donationware</title><link>http://dotnetfreak.co.uk/blog/archive/2007/07/13/formshield-and-donationware.aspx</link><pubDate>Fri, 13 Jul 2007 12:52:00 GMT</pubDate><guid isPermaLink="false">6329f370-38d9-4d4b-8419-567856985e22:1565</guid><dc:creator>dotNetFreak</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://dotnetfreak.co.uk/blog/rsscomments.aspx?PostID=1565</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://dotnetfreak.co.uk/blog/commentapi.aspx?PostID=1565</wfw:comment><comments>http://dotnetfreak.co.uk/blog/archive/2007/07/13/formshield-and-donationware.aspx#comments</comments><description>&lt;P mce_keep="true"&gt;One question I'm bound to be asked is why have I made FormShield v2.0 donationware rather than commercial and why haven't I continued to offer it for free.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Well, starting at the end first - FormShield is still &lt;U&gt;totally free&lt;/U&gt; for personal and commercial use and you are still able to distribute it with your applications without 'donating' a penny (or dime), providing &lt;U&gt;you&lt;/U&gt; don't charge for it of course!&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;&lt;BR&gt;Ok,&amp;nbsp;so if it's free why the 'dotNetFreak.co.uk adverts'?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Well, when something is offered for free (or donationware), it's too easy to just take it, use it and forget about it. I've done it, you've done, everyone does it. By having a couple of 'gentle' reminders, it prompts us to think "Actually I do use this a lot more than I initially thought, I'm going to pay something for this". Of course that's the idea, whether it works or not is another matter!&lt;/P&gt;
&lt;P mce_keep="true"&gt;If it doesn't, I should at least end up with more people using FormShield and hopefully some of them will donate!&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;&lt;BR&gt;Why donationware?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;The idea behind making FormShield donationware is simple:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Some people have suggested it as they would like to contribute towards future development of FormShield and other controls.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;FormShield is a complex control and because of this it has taken a large amount of time to create.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;I don't get paid for doing this - in fact it actually costs me money!&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;I didn't want to restrict the overall functionality of FormShield.&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;&lt;BR&gt;Why not commercial?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;The problem with making anything commercial is it removes it from the realm of being a hobby which is all my controls are at the end of day. Yes, they were initially written for other projects, but those projects didn't need me to write new versions. Also, I don't have time to support another&amp;nbsp;commercial venture, I spend most of my time working as it is! I also hate writing documentation and examples, both of which I would need to do to make FormShield commercial.&lt;/P&gt;
&lt;P mce_keep="true"&gt;I also didn't want to stop the&amp;nbsp;smaller Web sites and hobbyists&amp;nbsp;from using FormShield because they couldn't afford to pay the 'commercial' (per Web site in some cases) license fees.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;&lt;BR&gt;Right, so it's totally free if I don't mind the occasional 'dotNetFreak.co.uk' advert?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Yep.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;&lt;BR&gt;Are all of your existing controls and future controls moving to donationware?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;No. Only FormShield, but if you want to send a donation for the others please feel free!&lt;/P&gt;
&lt;P mce_keep="true"&gt;If I release future controls (quite likely as I'm starting a new project shortly which will probably require custom controls) they may or may not be donationware. More than likely the first versions won't be.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;&lt;BR&gt;I want to donate - How much?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Firstly, thank you!&lt;/P&gt;
&lt;P mce_keep="true"&gt;Secondly, whatever you want. Its not that I don't care how much you donate, I don't know your circumstances or how widely you use my controls. If you're working for a Web design agency and you use my controls on two hundred Web sites, perhaps you should be thinking more than the one guy who adds it to his blog, but at the end of the day it's entirely up to you, I'm just happy you're going to donate!&lt;/P&gt;&lt;img src="http://dotnetfreak.co.uk/aggbug.aspx?PostID=1565" width="1" height="1"&gt;</description><category domain="http://dotnetfreak.co.uk/blog/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://dotnetfreak.co.uk/blog/archive/tags/Windows+Forms+.NET/default.aspx">Windows Forms .NET</category></item><item><title>Shared Variables - Object Reference Not Set to an Instance of an Object</title><link>http://dotnetfreak.co.uk/blog/archive/2007/07/12/shared-variables-object-reference-not-set-to-an-instance-of-an-object.aspx</link><pubDate>Thu, 12 Jul 2007 09:56:00 GMT</pubDate><guid isPermaLink="false">6329f370-38d9-4d4b-8419-567856985e22:1544</guid><dc:creator>dotNetFreak</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://dotnetfreak.co.uk/blog/rsscomments.aspx?PostID=1544</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://dotnetfreak.co.uk/blog/commentapi.aspx?PostID=1544</wfw:comment><comments>http://dotnetfreak.co.uk/blog/archive/2007/07/12/shared-variables-object-reference-not-set-to-an-instance-of-an-object.aspx#comments</comments><description>&lt;P mce_keep="true"&gt;Can someone please explain why this throws an exception?&lt;/P&gt;
&lt;P mce_keep="true"&gt;What's even stranger, is that in one class where I do something similar to this four times, three work fine, but the other one throws an exception...&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;FONT color=#0000ff size=2&gt;Partial&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Class&lt;/FONT&gt;&lt;FONT size=2&gt; Strangeness&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;FONT color=#0000ff size=2&gt;Inherits&lt;/FONT&gt;&lt;FONT size=2&gt; System.Web.UI.Page&lt;/FONT&gt; &lt;/BLOCKQUOTE&gt;&lt;BR&gt;
&lt;BLOCKQUOTE&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Private&lt;/FONT&gt;&lt;FONT size=2&gt; _alphaCharacters() &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt; = MyDefaults.AlphaCharacters&lt;/FONT&gt;&lt;/FONT&gt;&lt;/BLOCKQUOTE&gt;&lt;BR&gt;
&lt;BLOCKQUOTE&gt;&lt;FONT color=#0000ff size=2&gt;Public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ReadOnly&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Property&lt;/FONT&gt;&lt;FONT size=2&gt; AlphaCharacters() &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt;()&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Get&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Return&lt;/FONT&gt;&lt;FONT size=2&gt; _alphaCharacters&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Get&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Property&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BR&gt;
&lt;BLOCKQUOTE&gt;&lt;FONT color=#0000ff size=2&gt;Protected&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT size=2&gt; Page_Load(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; sender &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Object&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; e &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; System.EventArgs) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Handles&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.Load&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;Response.Write(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.AlphaCharacters.Length)&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;/P&gt;&lt;BR&gt;&lt;FONT color=#0000ff size=2&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Class&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&lt;BR&gt;Public&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Class&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; MyDefaults&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;BR&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;BLOCKQUOTE&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Shared&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ReadOnly&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;FONT color=#000000&gt;AlphaCharacters()&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt; = &lt;FONT color=#000000&gt;MyDefaults.DefaultAlphaCharacters&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Shared&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ReadOnly&lt;/FONT&gt;&lt;FONT size=2&gt; DefaultAlphaCharacters() &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt; = {&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"A", "B"&lt;/FONT&gt;&lt;FONT size=2&gt;}&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;/BLOCKQUOTE&gt;&lt;BR&gt;
&lt;P&gt;End&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Class&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;img src="http://dotnetfreak.co.uk/aggbug.aspx?PostID=1544" width="1" height="1"&gt;</description><category domain="http://dotnetfreak.co.uk/blog/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://dotnetfreak.co.uk/blog/archive/tags/Windows+Forms+.NET/default.aspx">Windows Forms .NET</category></item><item><title>My 3 Pet Peeves with Visual Studio 2003</title><link>http://dotnetfreak.co.uk/blog/archive/2005/09/01/my-3-pet-peeves-with-visual-studio-2003.aspx</link><pubDate>Thu, 01 Sep 2005 08:54:00 GMT</pubDate><guid isPermaLink="false">6329f370-38d9-4d4b-8419-567856985e22:772</guid><dc:creator>dotNetFreak</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://dotnetfreak.co.uk/blog/rsscomments.aspx?PostID=772</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://dotnetfreak.co.uk/blog/commentapi.aspx?PostID=772</wfw:comment><comments>http://dotnetfreak.co.uk/blog/archive/2005/09/01/my-3-pet-peeves-with-visual-studio-2003.aspx#comments</comments><description>&lt;P&gt;I know there are probably a lot more&amp;nbsp;I could come up with, but these are my top 3 that I really hope Microsoft have fixed/resolved in Visual Studio 2005.&lt;/P&gt;&lt;BR&gt;
&lt;P&gt;1. Why oh why when you open a solution with multiple projects, including a handful of setup projects does VS feel like it has to expand all of the setup projects? It doesn't do it with any other project type. No matter what I do it ALWAYS expands them.&lt;/P&gt;&lt;BR&gt;
&lt;P&gt;2. Pinning the toolbox on some/most occasions hangs VS, the only resolution is to 'End Task'. Has this ever been fixed? Why does it always seem to happen when I REALLY don't want it to? Does VS have some built in sick sense of humour??&lt;/P&gt;&lt;BR&gt;
&lt;P&gt;&lt;STRIKE&gt;3. Opening some/most help items from the index takes forever. Normally I have time to make a coffee and come back to my desk before it's opened. This can't be related to the performance of the machine either as it took the same time on my old PC as it does on my new one. Anyone know of a resolution to this?&lt;/STRIKE&gt; &lt;FONT color=#000080&gt;Resolved (see below)&lt;/FONT&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P&gt;Argh!&lt;/P&gt;&lt;img src="http://dotnetfreak.co.uk/aggbug.aspx?PostID=772" width="1" height="1"&gt;</description><category domain="http://dotnetfreak.co.uk/blog/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://dotnetfreak.co.uk/blog/archive/tags/Windows+Forms+.NET/default.aspx">Windows Forms .NET</category></item><item><title>Determining the Build Date of an Assembly</title><link>http://dotnetfreak.co.uk/blog/archive/2004/07/08/determining-the-build-date-of-an-assembly.aspx</link><pubDate>Thu, 08 Jul 2004 12:49:00 GMT</pubDate><guid isPermaLink="false">6329f370-38d9-4d4b-8419-567856985e22:146</guid><dc:creator>dotNetFreak</dc:creator><slash:comments>8</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://dotnetfreak.co.uk/blog/rsscomments.aspx?PostID=146</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://dotnetfreak.co.uk/blog/commentapi.aspx?PostID=146</wfw:comment><comments>http://dotnetfreak.co.uk/blog/archive/2004/07/08/determining-the-build-date-of-an-assembly.aspx#comments</comments><description>&lt;P&gt;Sometimes it can be quite handy to display the build date of an assembly in an 'About' window or similar. After reading a couple of threads on how it can be calculated from the build and revision numbers,&amp;nbsp;below is a very simple function to produce the build date for the currently executing assembly.&lt;/P&gt;
&lt;P&gt;This ONLY works&amp;nbsp;if the assembly was&amp;nbsp;built using&amp;nbsp;VS.NET and the assembly version attribute is set to something like the below. The asterisk (*) is the important part, as if present, VS.NET generates both the build and revision numbers automatically.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;FONT size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Assembly&lt;/FONT&gt;&lt;FONT size=2&gt;: AssemblyVersion("1.0.*")&amp;gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;The code...&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;FONT color=#0000ff size=2&gt;Private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Function&lt;/FONT&gt;&lt;FONT size=2&gt; BuildDate() &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Date&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'Build dates start from 01/01/2000&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Dim&lt;/FONT&gt;&lt;FONT size=2&gt; result &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Date&lt;/FONT&gt;&lt;FONT size=2&gt; = #1/1/2000#&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'Retrieve the version information from the assembly from which this code is being executed&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Dim&lt;/FONT&gt;&lt;FONT size=2&gt; version &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; System.Version = System.Reflection.Assembly.GetExecutingAssembly.GetName.Version&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'Add the number of days (build)&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;result.AddDays(version.Build)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'Add the number of seconds since midnight (revision) multiplied by 2&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;result.AddSeconds(version.Revision * 2)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'If we're currently in daylight saving time add an extra hour&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/FONT&gt;&lt;FONT size=2&gt; TimeZone.IsDaylightSavingTime(Now, TimeZone.CurrentTimeZone.GetDaylightChanges(Now.Year)) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/FONT&gt;&lt;FONT size=2&gt; result.AddHours(1)&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Return&lt;/FONT&gt;&lt;FONT size=2&gt; result&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Function&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;An alternative method is to simply read the last time the file was written, using something similar to:&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P dir=ltr style="MARGIN-RIGHT: 0px"&gt;Return&lt;/FONT&gt;&lt;FONT size=2&gt; System.IO.File.GetLastWriteTime(System.Reflection.Assembly.GetExecutingAssembly.Location)&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;img src="http://dotnetfreak.co.uk/aggbug.aspx?PostID=146" width="1" height="1"&gt;</description><category domain="http://dotnetfreak.co.uk/blog/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://dotnetfreak.co.uk/blog/archive/tags/Windows+Forms+.NET/default.aspx">Windows Forms .NET</category></item></channel></rss>