<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>William Bartholomew &#187; programming</title>
	<atom:link href="http://blog.bartholomew.id.au/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.bartholomew.id.au</link>
	<description>Musings on software engineering, technology and Aspergers Syndrome.</description>
	<lastBuildDate>Sun, 01 Nov 2009 16:56:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.bartholomew.id.au' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/fddb6d13b8a166fa8e5180be576582d1?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>William Bartholomew &#187; programming</title>
		<link>http://blog.bartholomew.id.au</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.bartholomew.id.au/osd.xml" title="William Bartholomew" />
	<atom:link rel='hub' href='http://blog.bartholomew.id.au/?pushpress=hub'/>
		<item>
		<title>Generating Option Strict On Using CodeDOM</title>
		<link>http://blog.bartholomew.id.au/2009/08/06/generating-option-strict-on-using-codedom/</link>
		<comments>http://blog.bartholomew.id.au/2009/08/06/generating-option-strict-on-using-codedom/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 23:35:32 +0000</pubDate>
		<dc:creator>wbarthol</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://williamb.wordpress.com/2009/08/06/generating-option-strict-on-using-codedom/</guid>
		<description><![CDATA[I was writing a VB.NET code generator this morning using System.CodeDOM and the default code that is generated includes “Option Strict Off” while I wanted “Option Strict On”. After some investigation I discovered that you can set this using: outCodeCompileUnit.UserData(&#34;AllowLateBound&#34;) = False<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bartholomew.id.au&blog=6977030&post=121&subd=williamb&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I was writing a VB.NET code generator this morning using System.CodeDOM and the default code that is generated includes “Option Strict Off” while I wanted “Option Strict On”. After some investigation I discovered that you can set this using:</p>
<pre class="code">outCodeCompileUnit.UserData(<span style="color:#a31515;">&quot;AllowLateBound&quot;</span>) = <span style="color:blue;">False</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamb.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamb.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamb.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamb.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamb.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamb.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamb.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamb.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamb.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamb.wordpress.com/121/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bartholomew.id.au&blog=6977030&post=121&subd=williamb&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.bartholomew.id.au/2009/08/06/generating-option-strict-on-using-codedom/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62b70c9f84b083ad81b566b44ec9a66c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wbarthol</media:title>
		</media:content>
	</item>
		<item>
		<title>Quick Excel Macro: Remove All Pictures</title>
		<link>http://blog.bartholomew.id.au/2009/07/31/quick-excel-macro-remove-all-pictures/</link>
		<comments>http://blog.bartholomew.id.au/2009/07/31/quick-excel-macro-remove-all-pictures/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 00:32:08 +0000</pubDate>
		<dc:creator>wbarthol</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://williamb.wordpress.com/2009/07/31/quick-excel-macro-remove-all-pictures/</guid>
		<description><![CDATA[I pasted some content into Excel, and while I did want the formatting, I didn’t want the pictures it included. This meant I couldn’t use Paste Special. Solution? A quick macro to remove all shapes from the sheet after I pasted: Public Sub RemoveAllShapes() &#160;&#160;&#160; For Each e In Shapes &#160;&#160;&#160;&#160;&#160;&#160;&#160; e.Delete &#160;&#160;&#160; Next End [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bartholomew.id.au&blog=6977030&post=118&subd=williamb&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I pasted some content into Excel, and while I did want the formatting, I didn’t want the pictures it included. This meant I couldn’t use Paste Special.</p>
<p>Solution? A quick macro to remove all shapes from the sheet after I pasted:</p>
<p>Public Sub RemoveAllShapes()   <br />&#160;&#160;&#160; For Each e In Shapes    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; e.Delete    <br />&#160;&#160;&#160; Next    <br />End Sub</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamb.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamb.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamb.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamb.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamb.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamb.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamb.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamb.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamb.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamb.wordpress.com/118/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bartholomew.id.au&blog=6977030&post=118&subd=williamb&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.bartholomew.id.au/2009/07/31/quick-excel-macro-remove-all-pictures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62b70c9f84b083ad81b566b44ec9a66c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wbarthol</media:title>
		</media:content>
	</item>
		<item>
		<title>Snagit Accessory Installer</title>
		<link>http://blog.bartholomew.id.au/2009/06/20/snagit-accessory-installer/</link>
		<comments>http://blog.bartholomew.id.au/2009/06/20/snagit-accessory-installer/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 23:51:29 +0000</pubDate>
		<dc:creator>wbarthol</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[utility]]></category>

		<guid isPermaLink="false">http://blog.bartholomew.id.au/?p=114</guid>
		<description><![CDATA[I&#8217;ve used Snagit from TechSmith for a year or so now and despite not being free it is without a doubt the best screen capture software I&#8217;ve used and I recommend it to anyone that asks me about screen capture software.This post actually isn&#8217;t about any of it&#8217;s screen capture capabilities but part of their installation. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bartholomew.id.au&blog=6977030&post=114&subd=williamb&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p align="left"><span style="font-size:x-small;">I&#8217;ve used </span><a href="http://www.techsmith.com/screen-capture.asp"><span style="font-size:x-small;">Snagit</span></a><span style="font-size:x-small;"> from </span><a href="http://www.techsmith.com/"><span style="font-size:x-small;">TechSmith</span></a> <span style="font-size:x-small;">for a year or so now and despite not being free it is without a doubt the best screen capture software I&#8217;ve used and I recommend it to anyone that asks me about screen capture software.This post actually isn&#8217;t about any of it&#8217;s screen capture capabilities but part of their installation. Snagit allows you to install what are called &#8220;accessories&#8221; (aka plugins) to add additional capabilities to the software. In fact, I&#8217;m writing this post with their WordPress.com accessory.</span></p>
<p><span style="font-size:x-small;">Plugins are certainly not a new concept by any stretch of the imagination, but what impressed me about TechSmith&#8217;s implementation is the installation process. Plugins aren&#8217;t normally a user-friendly concept because they usually involve putting files in special locations or doing special configuration.</p>
<p>TechSmith take away this complexity by registering a file extension (*.snagacc). These files are effectively a Zip file containing the DLLs and any dependencies of the plugin as well as a &#8220;manifest&#8221; containing information about the plugin. This file extension is registered to Snagit and the result is that simply double-clicking the *.snagacc file does all of the copying and configuration necessary for that plugin.</p>
<div><span style="font-size:x-small;"><span style="font-size:x-small;">I&#8217;m impressed by the simplicity (for both the user and the plugin author) of this technique. The use of a renamed Zip file is now a common one and is used by Office 2007 for *.docx, *.pptx, *.xlsx, etc. and this is just another example of the usefulness of this technique.</span></span></div>
<p></span></p>
<p align="center"><a href="http://williamb.files.wordpress.com/2009/06/techsmithwor386.png"><img src="http://williamb.files.wordpress.com/2009/06/techsmithwor386.png?w=320&#038;h=170" alt="" hspace="6" width="320" height="170" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamb.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamb.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamb.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamb.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamb.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamb.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamb.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamb.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamb.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamb.wordpress.com/114/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bartholomew.id.au&blog=6977030&post=114&subd=williamb&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.bartholomew.id.au/2009/06/20/snagit-accessory-installer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62b70c9f84b083ad81b566b44ec9a66c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wbarthol</media:title>
		</media:content>

		<media:content url="http://williamb.files.wordpress.com/2009/06/techsmithwor386.png" medium="image" />
	</item>
		<item>
		<title>VSTO Deployment Error: The required version of the .NET Framework is not installed on this computer</title>
		<link>http://blog.bartholomew.id.au/2009/06/11/vsto-deployment-error-the-required-version-of-the-net-framework-is-not-installed-on-this-computer/</link>
		<comments>http://blog.bartholomew.id.au/2009/06/11/vsto-deployment-error-the-required-version-of-the-net-framework-is-not-installed-on-this-computer/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 06:03:14 +0000</pubDate>
		<dc:creator>wbarthol</dc:creator>
				<category><![CDATA[dotnet]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://williamb.wordpress.com/2009/06/11/vsto-deployment-error-the-required-version-of-the-net-framework-is-not-installed-on-this-computer/</guid>
		<description><![CDATA[I’ve been going crazy to try and solve a problem with a VSTO package I was publishing. Users were receiving the error “The required version of the .NET Framework is not installed on this computer” even though they had the correct .NET Framework version. It turns out that there is a file missing from the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bartholomew.id.au&blog=6977030&post=97&subd=williamb&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I’ve been going crazy to try and solve a problem with a VSTO package I was publishing. Users were receiving the error “The required version of the .NET Framework is not installed on this computer” even though they had the correct .NET Framework version. It turns out that there is a file missing from the .NET Framework 3.5 installation in Windows 7 Beta/RC that causes any packages published from a Windows 7 Beta/RC machine to display this error.</p>
<p>For more details and the workaround read:</p>
<p><a title="http://blogs.msdn.com/vsto/archive/2009/05/07/issues-with-installing-vsto-projects-that-were-published-from-visual-studio-2008-on-windows-7-rc-saurabh-bhatia.aspx#comments" href="http://blogs.msdn.com/vsto/archive/2009/05/07/issues-with-installing-vsto-projects-that-were-published-from-visual-studio-2008-on-windows-7-rc-saurabh-bhatia.aspx#comments">http://blogs.msdn.com/vsto/archive/2009/05/07/issues-with-installing-vsto-projects-that-were-published-from-visual-studio-2008-on-windows-7-rc-saurabh-bhatia.aspx#comments</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamb.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamb.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamb.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamb.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamb.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamb.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamb.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamb.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamb.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamb.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bartholomew.id.au&blog=6977030&post=97&subd=williamb&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.bartholomew.id.au/2009/06/11/vsto-deployment-error-the-required-version-of-the-net-framework-is-not-installed-on-this-computer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62b70c9f84b083ad81b566b44ec9a66c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wbarthol</media:title>
		</media:content>
	</item>
		<item>
		<title>Arrowhead Anti-Pattern</title>
		<link>http://blog.bartholomew.id.au/2009/05/31/arrowhead-anti-pattern/</link>
		<comments>http://blog.bartholomew.id.au/2009/05/31/arrowhead-anti-pattern/#comments</comments>
		<pubDate>Sun, 31 May 2009 09:54:14 +0000</pubDate>
		<dc:creator>wbarthol</dc:creator>
				<category><![CDATA[dotnet]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://williamb.wordpress.com/2009/05/31/arrowhead-anti-pattern/</guid>
		<description><![CDATA[It is a common belief that methods should have a single entry and exit point. While this is a noble goal you need to be very aware that you can detract from the readability and comprehensibility of your code simply to uphold that belief. While a single exit point is not an anti-pattern striving to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bartholomew.id.au&blog=6977030&post=95&subd=williamb&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>It is a common belief that methods should have a single entry and exit point. While this is a noble goal you need to be very aware that you can detract from the readability and comprehensibility of your code simply to uphold that belief. While a single exit point is not an anti-pattern striving to achieve a single exit point can result in deeply nested “arrowhead” code which is an anti-pattern. </p>
<p>My basic advice to you is that you should only strive for a single exit point from your method when it aids in the readability and comprehensibility of that method, if it doesn’t then don’t get caught up in having a single exit point.</p>
<p><a title="http://www.lostechies.com/blogs/chrismissal/archive/2009/05/27/anti-patterns-and-worst-practices-the-arrowhead-anti-pattern.aspx" href="http://www.lostechies.com/blogs/chrismissal/archive/2009/05/27/anti-patterns-and-worst-practices-the-arrowhead-anti-pattern.aspx">http://www.lostechies.com/blogs/chrismissal/archive/2009/05/27/anti-patterns-and-worst-practices-the-arrowhead-anti-pattern.aspx</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamb.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamb.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamb.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamb.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamb.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamb.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamb.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamb.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamb.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamb.wordpress.com/95/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bartholomew.id.au&blog=6977030&post=95&subd=williamb&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.bartholomew.id.au/2009/05/31/arrowhead-anti-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62b70c9f84b083ad81b566b44ec9a66c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wbarthol</media:title>
		</media:content>
	</item>
		<item>
		<title>Validating XML files against an XML Schema (XSD)</title>
		<link>http://blog.bartholomew.id.au/2009/05/31/validating-xml-files-against-an-xml-schema-xsd/</link>
		<comments>http://blog.bartholomew.id.au/2009/05/31/validating-xml-files-against-an-xml-schema-xsd/#comments</comments>
		<pubDate>Sun, 31 May 2009 08:27:25 +0000</pubDate>
		<dc:creator>wbarthol</dc:creator>
				<category><![CDATA[dotnet]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://williamb.wordpress.com/2009/05/31/validating-xml-files-against-an-xml-schema-xsd/</guid>
		<description><![CDATA[UPDATE: You must set the ValidationFlags property to XmlSchemaValidationFlags.ReportValidationWarnings and you must add the event handler before calling Create on XmlReader, otherwise the event won’t be raised. Validating XML files against an XML Schema (XSD) has changed slightly in .NET Framework 3.5 because the XmlValidatingReader has been obsoleted as have XmlReader’s constructors. The correct way [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bartholomew.id.au&blog=6977030&post=94&subd=williamb&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE: </strong>You must set the ValidationFlags property to XmlSchemaValidationFlags.ReportValidationWarnings and you must add the event handler <strong>before</strong> calling Create on XmlReader, otherwise the event won’t be raised.</p>
<p>Validating XML files against an XML Schema (XSD) has changed slightly in .NET Framework 3.5 because the XmlValidatingReader has been obsoleted as have XmlReader’s constructors. The correct way to validate an XML file now is to:</p>
<ol>
<li>Create an XmlReaderSettings class, set the ValidationType to ValidationType.Schema, set the validation flags to report warnings, and add your schema to the Schemas collection.</li>
<li>Add a handler for the ValidationEventHandler event, unusually this event is raised from the XmlReaderSettings class not the XmlReader class.</li>
<li>Use the Create factory method on XmlReader passing in the path to the XML file and the XmlReaderSettings object you created above.</li>
<li>Iterate through all of the nodes in the XmlReader (validation is done as the reader processes each node).</li>
<li>Close the reader.</li>
<li>Remove the event handler.</li>
</ol>
<p>Here is an example:</p>
<pre class="code"><span style="color:blue;">Dim </span>settings <span style="color:blue;">As New </span>XmlReaderSettings()
settings.ValidationType = ValidationType.Schema
settings.Schemas.Add(<span style="color:#a31515;">"http://tempuri.org/MySchema.xsd"</span>, <span style="color:#a31515;">"MySchema.xsd"</span>))
settings.ValidationFlags = XmlSchemaValidationFlags.ReportValidationWarnings

<span style="color:blue;">Try
    AddHandler </span>settings.ValidationEventHandler, <span style="color:blue;">AddressOf </span>ValidationEventHandler 

    <span style="color:blue;">Using </span>reader <span style="color:blue;">As </span>XmlReader = XmlReader.Create(<span style="color:#a31515;">"MyInstance.xml"</span>, settings)
        <span style="color:blue;">While </span>reader.Read()
        <span style="color:blue;">End While

        </span>reader.Close()
<span style="color:blue;">    End Using
<span style="color:blue;">Finally
     RemoveHandler </span></span>settings.ValidationEventHandler, <span class="kwrd">AddressOf</span> ValidationEventHandler
<span style="color:blue;"><span style="color:blue;">End Try</span></span></pre>
<pre class="code">...</pre>
<pre class="code"><span style="color:blue;">Private Sub </span>ValidationEventHandler(<span style="color:blue;">ByVal </span>sender <span style="color:blue;">As Object</span>, <span style="color:blue;">ByVal </span>e <span style="color:blue;">As </span>ValidationEventArgs)
    ...
<span style="color:blue;">End Sub</span></pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamb.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamb.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamb.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamb.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamb.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamb.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamb.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamb.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamb.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamb.wordpress.com/94/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bartholomew.id.au&blog=6977030&post=94&subd=williamb&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.bartholomew.id.au/2009/05/31/validating-xml-files-against-an-xml-schema-xsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62b70c9f84b083ad81b566b44ec9a66c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wbarthol</media:title>
		</media:content>
	</item>
		<item>
		<title>Unity 1.2 Hands-on Labs and Advertising Injectable Dependencies</title>
		<link>http://blog.bartholomew.id.au/2009/04/05/unity-12-hands-on-labs-and-advertising-injectable-dependencies/</link>
		<comments>http://blog.bartholomew.id.au/2009/04/05/unity-12-hands-on-labs-and-advertising-injectable-dependencies/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 09:49:30 +0000</pubDate>
		<dc:creator>wbarthol</dc:creator>
				<category><![CDATA[dotnet]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.bartholomew.id.au/2009/04/05/unity-12-hands-on-labs-and-advertising-injectable-dependencies/</guid>
		<description><![CDATA[Hand-on Labs for Unity 1.2 are now available (via J.D. Meier). Unity is a very simple and lightweight dependency injection container. One of the features of Unity is the ability to define type aliases that allow you to define the full type name once and then use an alias to refer to it elsewhere in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bartholomew.id.au&blog=6977030&post=89&subd=williamb&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=93a5e18f-3211-44ef-b785-c59bcec4cd6f" target="_blank">Hand-on Labs for Unity 1.2</a> are now available (via <a href="http://blogs.msdn.com/jmeier/archive/2009/04/03/new-release-hands-on-labs-for-unity-1-2.aspx" target="_blank">J.D. Meier</a>). Unity is a very simple and lightweight dependency injection container.</p>
<p>One of the features of Unity is the ability to define type aliases that allow you to define the full type name once and then use an alias to refer to it elsewhere in the configuration. For example:</p>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">unity</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">typeAliases</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">typeAlias</span> <span class="attr">alias</span><span class="kwrd">="IClipboard"</span>
            <span class="attr">type</span><span class="kwrd">="MyApplication.Services.Clipboard.IClipboard, MyApplication"</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">typeAliases</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">unity</span><span class="kwrd">&gt;</span></pre>
<p>While working through the examples in the hands-on labs it occurred to me that this is a good way of advertising the different dependencies that can be injected. By defining a type alias for each of the dependencies that can be injected (both mandatory and optional) then developers wanting to extend your application can easily see the available dependencies.</p>
<p>For example:</p>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">unity</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">typeAliases</span><span class="kwrd">&gt;</span>
        <span class="rem">&lt;!--Mandatory--&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">typeAlias</span> <span class="attr">alias</span><span class="kwrd">="IClipboard"</span>
            <span class="attr">type</span><span class="kwrd">="MyApplication.Services.Clipboard.IClipboard, MyApplication"</span> <span class="kwrd">/&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">typeAlias</span> <span class="attr">alias</span><span class="kwrd">="IStore"</span>
            <span class="attr">type</span><span class="kwrd">="MyApplication.Services.Store.IStore, MyApplication"</span> <span class="kwrd">/&gt;</span>

        <span class="rem">&lt;!--Optional--&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">typeAlias</span> <span class="attr">alias</span><span class="kwrd">="ILogger"</span>
            <span class="attr">type</span><span class="kwrd">="MyApplication.Services.Logger.ILogger, MyApplication"</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">typeAliases</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">unity</span><span class="kwrd">&gt;</span></pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamb.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamb.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamb.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamb.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamb.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamb.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamb.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamb.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamb.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamb.wordpress.com/89/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bartholomew.id.au&blog=6977030&post=89&subd=williamb&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.bartholomew.id.au/2009/04/05/unity-12-hands-on-labs-and-advertising-injectable-dependencies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62b70c9f84b083ad81b566b44ec9a66c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wbarthol</media:title>
		</media:content>
	</item>
		<item>
		<title>Inside the Microsoft&#174; Build Engine: Using MSBuild and Team Foundation Build</title>
		<link>http://blog.bartholomew.id.au/2008/12/01/inside-the-microsoft-build-engine-using-msbuild-and-team-foundation-build/</link>
		<comments>http://blog.bartholomew.id.au/2008/12/01/inside-the-microsoft-build-engine-using-msbuild-and-team-foundation-build/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 12:29:29 +0000</pubDate>
		<dc:creator>wbarthol</dc:creator>
				<category><![CDATA[dotnet]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[teamsystem]]></category>

		<guid isPermaLink="false">http://blog.bartholomew.id.au/2008/12/01/inside-the-microsoft-build-engine-using-msbuild-and-team-foundation-build/</guid>
		<description><![CDATA[I’m proud to say that after many months of work Sayed Ibrahim Hashimi and I have completed work on Inside the Microsoft® Build Engine: Using MSBuild and Team Foundation Build (PRO-Developer). It is being published by Microsoft Press and is due out on 7th January 2009.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bartholomew.id.au&blog=6977030&post=80&subd=williamb&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I’m proud to say that after many months of work <a target="_blank" href="http://www.sedodream.com/">Sayed Ibrahim Hashimi</a> and I have completed work on <a href="http://www.amazon.com/gp/product/0735626286?ie=UTF8&amp;tag=willblog-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0735626286">Inside the Microsoft® Build Engine: Using MSBuild and Team Foundation Build (PRO-Developer)</a>. It is being published by Microsoft Press and is due out on 7th January 2009.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamb.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamb.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamb.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamb.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamb.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamb.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamb.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamb.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamb.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamb.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bartholomew.id.au&blog=6977030&post=80&subd=williamb&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.bartholomew.id.au/2008/12/01/inside-the-microsoft-build-engine-using-msbuild-and-team-foundation-build/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62b70c9f84b083ad81b566b44ec9a66c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wbarthol</media:title>
		</media:content>
	</item>
		<item>
		<title>Documentation Is There For A Reason</title>
		<link>http://blog.bartholomew.id.au/2008/11/25/documentation-is-there-for-a-reason/</link>
		<comments>http://blog.bartholomew.id.au/2008/11/25/documentation-is-there-for-a-reason/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 12:28:26 +0000</pubDate>
		<dc:creator>wbarthol</dc:creator>
				<category><![CDATA[dotnet]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.bartholomew.id.au/2008/11/25/documentation-is-there-for-a-reason/</guid>
		<description><![CDATA[Michael Kaplan’s post “y? Because it&#8217;s documented that way!” raises a good point about undocumented behaviour. Basically, just because it works doesn’t mean you should, unless it’s documented that is. If you rely on undocumented behaviour you are exposing yourself to a higher level of risk when the API you use is revised. Whether one [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bartholomew.id.au&blog=6977030&post=79&subd=williamb&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Michael Kaplan’s post “<a href="http://blogs.msdn.com/michkap/archive/2008/11/25/9140376.aspx">y? Because it&#8217;s documented that way!</a>” raises a good point about undocumented behaviour. Basically, just because it works doesn’t mean you should, unless it’s documented that is. If you rely on undocumented behaviour you are exposing yourself to a higher level of risk when the API you use is revised.</p>
<blockquote><p>Whether one looks at the <a href="http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx">Custom Date and Time Format Strings</a> used by things like <a href="http://msdn.microsoft.com/en-us/library/zdtaw1bw.aspx">DateTime.ToString(string)</a> or the strings in <a href="http://msdn.microsoft.com/en-us/library/ms776293.aspx">GetDateFormat</a> or the strings in <a href="http://msdn.microsoft.com/en-us/library/ms776299.aspx">GetTimeFormat</a>, it is clear that some characters (like <b>H</b> and <b>M</b>) have specific meaning attached to the cased variants.</p>
<p>In my book, since only the lowercase <b>y</b> is used here, the uppercase behavior is undefined &#8212; if it works then have fun but you really shouldn&#8217;t; if it fails then you kind of asked for that failure&#8230;.</p>
<p>And more importantly, if the meaning changes in the future then that is also something requested in the improper use. and the nature of <b>H</b> vs. <b>h</b> and <b>M</b> vs. <b>m</b> kind of underscores this.<img src="http://blogs.msdn.com/aggbug.aspx?PostID=9140376" width="1" height="1" /></p>
</blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamb.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamb.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamb.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamb.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamb.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamb.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamb.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamb.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamb.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamb.wordpress.com/79/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bartholomew.id.au&blog=6977030&post=79&subd=williamb&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.bartholomew.id.au/2008/11/25/documentation-is-there-for-a-reason/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62b70c9f84b083ad81b566b44ec9a66c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wbarthol</media:title>
		</media:content>

		<media:content url="http://blogs.msdn.com/aggbug.aspx?PostID=9140376" medium="image" />
	</item>
		<item>
		<title>Installing SQL Server 2005 On Windows Vista/IIS 7</title>
		<link>http://blog.bartholomew.id.au/2008/10/17/installing-sql-server-2005-on-windows-vistaiis-7/</link>
		<comments>http://blog.bartholomew.id.au/2008/10/17/installing-sql-server-2005-on-windows-vistaiis-7/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 02:46:51 +0000</pubDate>
		<dc:creator>wbarthol</dc:creator>
				<category><![CDATA[dotnet]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://blog.bartholomew.id.au/2008/10/17/installing-sql-server-2005-on-windows-vistaiis-7/</guid>
		<description><![CDATA[While doing a SQL Server 2005 installation on Windows Vista I received a warning during the System Configuration Check stating that IIS was required although I already had IIS installed.   After some searching I found the following knowledgebase article http://support.microsoft.com/kb/920201 which describes how to resolve the warning.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bartholomew.id.au&blog=6977030&post=76&subd=williamb&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>While doing a SQL Server 2005 installation on Windows Vista I received a warning during the System Configuration Check stating that IIS was required although I already had IIS installed.</p>
<p><a href="http://blog.bartholomew.id.au/wp-content/uploads/blog.bartholomew.id.au/2008/10/image5.png"></a><img class="alignnone size-full wp-image-100" title="image5" src="http://williamb.files.wordpress.com/2008/10/image5.png?w=501&#038;h=451" alt="image5" width="501" height="451" /> </p>
<p>After some searching I found the following knowledgebase article <a title="http://support.microsoft.com/kb/920201" href="http://support.microsoft.com/kb/920201">http://support.microsoft.com/kb/920201</a> which describes how to resolve the warning.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamb.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamb.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamb.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamb.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamb.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamb.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamb.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamb.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamb.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamb.wordpress.com/76/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bartholomew.id.au&blog=6977030&post=76&subd=williamb&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.bartholomew.id.au/2008/10/17/installing-sql-server-2005-on-windows-vistaiis-7/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/62b70c9f84b083ad81b566b44ec9a66c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wbarthol</media:title>
		</media:content>

		<media:content url="http://williamb.files.wordpress.com/2008/10/image5.png" medium="image">
			<media:title type="html">image5</media:title>
		</media:content>
	</item>
	</channel>
</rss>