<?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/"
	>

<channel>
	<title>Wizz's Coding Solutions &#187; .NET 2008</title>
	<atom:link href="http://rainstorms.me.uk/blog/tag/net-2008/feed/" rel="self" type="application/rss+xml" />
	<link>http://rainstorms.me.uk/blog</link>
	<description>Problems that I come across in day to day coding</description>
	<lastBuildDate>Thu, 07 Jul 2011 07:50:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Linq and Reflection</title>
		<link>http://rainstorms.me.uk/blog/2008/04/02/linq-and-reflection/</link>
		<comments>http://rainstorms.me.uk/blog/2008/04/02/linq-and-reflection/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 10:22:34 +0000</pubDate>
		<dc:creator>wizzard</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[.NET 2008]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Object Orientation]]></category>
		<category><![CDATA[Solutions]]></category>

		<guid isPermaLink="false">http://rainstorms.me.uk/blog/2008/04/02/linq-and-reflection/</guid>
		<description><![CDATA[I&#8217;ve been using Linq to do queries on Reflection objects recently and I&#8217;ve found that it works quite well.  An example: - From pi In Me.GetType.GetProperties Select pi Where pi.CanRead And pi.CanWrite And Not pi.Name Like &#8220;*_Display&#8221; And pi.GetGetMethod.GetParameters.Length = 0 And (pi.PropertyType Is GetType(String) Or pi.PropertyType Is GetType(Boolean) Or pi.PropertyType Is GetType(Date) Or pi.PropertyType [...]


No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using Linq to do queries on Reflection objects recently and I&#8217;ve found that it works quite well.  An example: -</p>
<p>From pi In Me.GetType.GetProperties Select pi Where pi.CanRead And pi.CanWrite And Not pi.Name Like &#8220;*_Display&#8221; And pi.GetGetMethod.GetParameters.Length = 0 And (pi.PropertyType Is GetType(String) Or pi.PropertyType Is GetType(Boolean) Or pi.PropertyType Is GetType(Date) Or pi.PropertyType Is GetType(Integer) Or pi.PropertyType Is GetType(Boolean?) Or pi.PropertyType Is GetType(Date?) Or pi.PropertyType Is GetType(Integer?) Or pi.PropertyType.IsEnum)</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark this post</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F04%2F02%2Flinq-and-reflection%2F&amp;title=Linq+and+Reflection" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F04%2F02%2Flinq-and-reflection%2F&amp;title=Linq+and+Reflection" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F04%2F02%2Flinq-and-reflection%2F&amp;title=Linq+and+Reflection" rel="nofollow" title="Add to&nbsp;DotNetKicks"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/dotnetkicks.png" title="Add to&nbsp;DotNetKicks" alt="Add to&nbsp;DotNetKicks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F04%2F02%2Flinq-and-reflection%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://FriendSite.com/users/bookmarks/?u=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F04%2F02%2Flinq-and-reflection%2F&amp;t=Linq+and+Reflection" rel="nofollow" title="Add to&nbsp;FriendSite"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/friendsite.png" title="Add to&nbsp;FriendSite" alt="Add to&nbsp;FriendSite" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F04%2F02%2Flinq-and-reflection%2F&amp;title=Linq+and+Reflection" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F04%2F02%2Flinq-and-reflection%2F&amp;title=Linq+and+Reflection" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F04%2F02%2Flinq-and-reflection%2F&amp;title=Linq+and+Reflection" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F04%2F02%2Flinq-and-reflection%2F&amp;title=Linq+and+Reflection" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.shoutwire.com/?p=submit&amp;link=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F04%2F02%2Flinq-and-reflection%2F" rel="nofollow" title="Add to&nbsp;Shoutwire"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/shoutwire.png" title="Add to&nbsp;Shoutwire" alt="Add to&nbsp;Shoutwire" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F04%2F02%2Flinq-and-reflection%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F04%2F02%2Flinq-and-reflection%2F&amp;t=Linq+and+Reflection" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://rainstorms.me.uk/blog/2008/04/02/linq-and-reflection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>String Processing With Linq</title>
		<link>http://rainstorms.me.uk/blog/2008/03/26/string-processing-with-linq/</link>
		<comments>http://rainstorms.me.uk/blog/2008/03/26/string-processing-with-linq/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 23:11:40 +0000</pubDate>
		<dc:creator>wizzard</dc:creator>
				<category><![CDATA[.NET 2008]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Solutions]]></category>

		<guid isPermaLink="false">http://rainstorms.me.uk/blog/2008/03/26/string-processing-with-linq/</guid>
		<description><![CDATA[It just occurred to me that since a String can be treated as an array of characters, you should be able to do a Linq query on it, so I tried it, and it seems to work quite well&#8230; Dim Test = &#8220;The cat sat on the mat&#8221; Dim Test2 = (From c In Test [...]


No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>It just occurred to me that since a String can be treated as an array of characters, you should be able to do a Linq query on it, so I tried it, and it seems to work quite well&#8230;</p>
<p>Dim Test = &#8220;The cat sat on the mat&#8221;<br />
Dim Test2 = (From c In Test Select c Where c &lt;&gt; &#8221; &#8220;).ToArray()<br />
Console.Write(Test2)</p>
<p>Personally, I much prefer string processing this way than with Regular Expressions.  Granted, it isn&#8217;t so versatile and is undoubtedly more processor intensive, but if you aren&#8217;t bothered about the clock cycles and it will do what you want, it is much easier to code and read!</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark this post</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F26%2Fstring-processing-with-linq%2F&amp;title=String+Processing+With+Linq" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F26%2Fstring-processing-with-linq%2F&amp;title=String+Processing+With+Linq" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F26%2Fstring-processing-with-linq%2F&amp;title=String+Processing+With+Linq" rel="nofollow" title="Add to&nbsp;DotNetKicks"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/dotnetkicks.png" title="Add to&nbsp;DotNetKicks" alt="Add to&nbsp;DotNetKicks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F26%2Fstring-processing-with-linq%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://FriendSite.com/users/bookmarks/?u=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F26%2Fstring-processing-with-linq%2F&amp;t=String+Processing+With+Linq" rel="nofollow" title="Add to&nbsp;FriendSite"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/friendsite.png" title="Add to&nbsp;FriendSite" alt="Add to&nbsp;FriendSite" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F26%2Fstring-processing-with-linq%2F&amp;title=String+Processing+With+Linq" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F26%2Fstring-processing-with-linq%2F&amp;title=String+Processing+With+Linq" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F26%2Fstring-processing-with-linq%2F&amp;title=String+Processing+With+Linq" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F26%2Fstring-processing-with-linq%2F&amp;title=String+Processing+With+Linq" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.shoutwire.com/?p=submit&amp;link=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F26%2Fstring-processing-with-linq%2F" rel="nofollow" title="Add to&nbsp;Shoutwire"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/shoutwire.png" title="Add to&nbsp;Shoutwire" alt="Add to&nbsp;Shoutwire" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F26%2Fstring-processing-with-linq%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F26%2Fstring-processing-with-linq%2F&amp;t=String+Processing+With+Linq" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://rainstorms.me.uk/blog/2008/03/26/string-processing-with-linq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Type Inference in .NET 2008 Part 2: Turning Type Inference On and Off</title>
		<link>http://rainstorms.me.uk/blog/2008/03/14/type-inference-in-net-2008-part-2-turning-it-on-and-off/</link>
		<comments>http://rainstorms.me.uk/blog/2008/03/14/type-inference-in-net-2008-part-2-turning-it-on-and-off/#comments</comments>
		<pubDate>Fri, 14 Mar 2008 17:16:15 +0000</pubDate>
		<dc:creator>wizzard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[.NET 2008]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://rainstorms.me.uk/blog/2008/03/14/type-inference-in-net-2008-part-2-turning-it-on-and-off/</guid>
		<description><![CDATA[This entry is part of a series, Type Inference in .NET&#187; To turn on/off Type Inference in a normal .NET project (apart from a website), go into My Project, select the Compile tab, and you can choose Option infer from the drop down list. To control it per file in VB.NET, you can write at [...]


No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="hackadelic-series-info on-frontpage"><small>This entry is part of a series,  <a href="javascript:;" class="hackadelic-sliderButton"onclick="toggleSlider('#hackadelic-sliderPanel-2')" title="click to expand/collapse slider Type Inference in .NET">Type Inference in .NET&raquo;</a> <span class="hackadelic-sliderPanel concealed" id="hackadelic-sliderPanel-2"></span></small></div><p>To turn on/off Type Inference in a normal .NET project (apart from a website), go into My Project, select the Compile tab, and you can choose Option infer from the drop down list.</p>
<p>To control it per file in VB.NET, you can write at the top Option Infer On or Option Infer Off.</p>
<p>In an ASP.NET website, there is a problem setting it &#8211; see <a href="http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=321981">this Microsoft Feedback Report</a>.  If anyone has any information on how to work around this, please post a comment.</p>
<div id="hackadelic-sliderNote-2" class="concealed">Entries in this series:<ol><li><a href="http://rainstorms.me.uk/blog/2008/03/14/type-inference-in-net-2008-part-1-what-is-type-inference/">Type Inference in .NET 2008 Part 1: What is Type Inference?</a></li><li>Type Inference in .NET 2008 Part 2: Turning Type Inference On and Off</li></ol><span style="display: block; margin-top: 3px; font-size: 7px"><a href="http://hackadelic.com/solutions/wordpress/sliding-notes" title="Powered by Hackadelic Sliding Notes 1.6.5">Powered by Hackadelic Sliding Notes 1.6.5</a></span></div><!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark this post</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-2-turning-it-on-and-off%2F&amp;title=Type+Inference+in+.NET+2008+Part+2%3A+Turning+Type+Inference+On+and+Off" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-2-turning-it-on-and-off%2F&amp;title=Type+Inference+in+.NET+2008+Part+2%3A+Turning+Type+Inference+On+and+Off" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-2-turning-it-on-and-off%2F&amp;title=Type+Inference+in+.NET+2008+Part+2%3A+Turning+Type+Inference+On+and+Off" rel="nofollow" title="Add to&nbsp;DotNetKicks"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/dotnetkicks.png" title="Add to&nbsp;DotNetKicks" alt="Add to&nbsp;DotNetKicks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-2-turning-it-on-and-off%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://FriendSite.com/users/bookmarks/?u=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-2-turning-it-on-and-off%2F&amp;t=Type+Inference+in+.NET+2008+Part+2%3A+Turning+Type+Inference+On+and+Off" rel="nofollow" title="Add to&nbsp;FriendSite"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/friendsite.png" title="Add to&nbsp;FriendSite" alt="Add to&nbsp;FriendSite" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-2-turning-it-on-and-off%2F&amp;title=Type+Inference+in+.NET+2008+Part+2%3A+Turning+Type+Inference+On+and+Off" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-2-turning-it-on-and-off%2F&amp;title=Type+Inference+in+.NET+2008+Part+2%3A+Turning+Type+Inference+On+and+Off" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-2-turning-it-on-and-off%2F&amp;title=Type+Inference+in+.NET+2008+Part+2%3A+Turning+Type+Inference+On+and+Off" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-2-turning-it-on-and-off%2F&amp;title=Type+Inference+in+.NET+2008+Part+2%3A+Turning+Type+Inference+On+and+Off" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.shoutwire.com/?p=submit&amp;link=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-2-turning-it-on-and-off%2F" rel="nofollow" title="Add to&nbsp;Shoutwire"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/shoutwire.png" title="Add to&nbsp;Shoutwire" alt="Add to&nbsp;Shoutwire" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-2-turning-it-on-and-off%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-2-turning-it-on-and-off%2F&amp;t=Type+Inference+in+.NET+2008+Part+2%3A+Turning+Type+Inference+On+and+Off" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://rainstorms.me.uk/blog/2008/03/14/type-inference-in-net-2008-part-2-turning-it-on-and-off/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Type Inference in .NET 2008 Part 1: What is Type Inference?</title>
		<link>http://rainstorms.me.uk/blog/2008/03/14/type-inference-in-net-2008-part-1-what-is-type-inference/</link>
		<comments>http://rainstorms.me.uk/blog/2008/03/14/type-inference-in-net-2008-part-1-what-is-type-inference/#comments</comments>
		<pubDate>Fri, 14 Mar 2008 15:23:02 +0000</pubDate>
		<dc:creator>wizzard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[.NET 2008]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://rainstorms.me.uk/blog/2008/03/14/type-inference-in-net-2008-part-1-what-is-type-inference/</guid>
		<description><![CDATA[This entry is part of a series, Type Inference in .NET&#187; I&#8217;ve just been playing with type inference.  This is a new feature in VB.NET 9 and C# 3 (I think it is v3) where you can get the compiler to assign a type to a new variable automatically by using &#8220;common sense&#8221;.  Note that [...]


No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="hackadelic-series-info on-frontpage"><small>This entry is part of a series,  <a href="javascript:;" class="hackadelic-sliderButton"onclick="toggleSlider('#hackadelic-sliderPanel-4')" title="click to expand/collapse slider Type Inference in .NET">Type Inference in .NET&raquo;</a> <span class="hackadelic-sliderPanel concealed" id="hackadelic-sliderPanel-4"></span></small></div><p>I&#8217;ve just been playing with type inference.  This is a new feature in VB.NET 9 and C# 3 (I think it is v3) where you can get the compiler to assign a type to a new variable automatically by using &#8220;common sense&#8221;.  Note that this looks just the same as weak typing, but it actually isn&#8217;t &#8211; the variables will be forced to the correct type by the compiler automatically, and intellisense even works!</p>
<p>For example, if you have type inference turned on, you can do this&#8230;</p>
<p>Dim i = 0 &#8216;i is automatically of type Integer<br />
Dim Numbers = {1,3,5,7,9}&#8217;Numbers is automatically of type Array(of Integer)</p>
<p>For Each Num in Numbers &#8216;Num is automatically of type Integer</p>
<p>Next</p>
<p>It might seem lazy, but isn&#8217;t that the whole point?</p>
<div id="hackadelic-sliderNote-4" class="concealed">Entries in this series:<ol><li>Type Inference in .NET 2008 Part 1: What is Type Inference?</li><li><a href="http://rainstorms.me.uk/blog/2008/03/14/type-inference-in-net-2008-part-2-turning-it-on-and-off/">Type Inference in .NET 2008 Part 2: Turning Type Inference On and Off</a></li></ol><span style="display: block; margin-top: 3px; font-size: 7px"><a href="http://hackadelic.com/solutions/wordpress/sliding-notes" title="Powered by Hackadelic Sliding Notes 1.6.5">Powered by Hackadelic Sliding Notes 1.6.5</a></span></div><!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark this post</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-1-what-is-type-inference%2F&amp;title=Type+Inference+in+.NET+2008+Part+1%3A+What+is+Type+Inference%3F" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-1-what-is-type-inference%2F&amp;title=Type+Inference+in+.NET+2008+Part+1%3A+What+is+Type+Inference%3F" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-1-what-is-type-inference%2F&amp;title=Type+Inference+in+.NET+2008+Part+1%3A+What+is+Type+Inference%3F" rel="nofollow" title="Add to&nbsp;DotNetKicks"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/dotnetkicks.png" title="Add to&nbsp;DotNetKicks" alt="Add to&nbsp;DotNetKicks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-1-what-is-type-inference%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://FriendSite.com/users/bookmarks/?u=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-1-what-is-type-inference%2F&amp;t=Type+Inference+in+.NET+2008+Part+1%3A+What+is+Type+Inference%3F" rel="nofollow" title="Add to&nbsp;FriendSite"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/friendsite.png" title="Add to&nbsp;FriendSite" alt="Add to&nbsp;FriendSite" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-1-what-is-type-inference%2F&amp;title=Type+Inference+in+.NET+2008+Part+1%3A+What+is+Type+Inference%3F" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-1-what-is-type-inference%2F&amp;title=Type+Inference+in+.NET+2008+Part+1%3A+What+is+Type+Inference%3F" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-1-what-is-type-inference%2F&amp;title=Type+Inference+in+.NET+2008+Part+1%3A+What+is+Type+Inference%3F" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-1-what-is-type-inference%2F&amp;title=Type+Inference+in+.NET+2008+Part+1%3A+What+is+Type+Inference%3F" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.shoutwire.com/?p=submit&amp;link=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-1-what-is-type-inference%2F" rel="nofollow" title="Add to&nbsp;Shoutwire"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/shoutwire.png" title="Add to&nbsp;Shoutwire" alt="Add to&nbsp;Shoutwire" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-1-what-is-type-inference%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Frainstorms.me.uk%2Fblog%2F2008%2F03%2F14%2Ftype-inference-in-net-2008-part-1-what-is-type-inference%2F&amp;t=Type+Inference+in+.NET+2008+Part+1%3A+What+is+Type+Inference%3F" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://rainstorms.me.uk/blog/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://rainstorms.me.uk/blog/2008/03/14/type-inference-in-net-2008-part-1-what-is-type-inference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

