<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Using &#34;var&#34; to simplify code and avoid redundancy</title>
	<atom:link href="http://www.ytechie.com/2008/06/using-var-to-simplify-code-and-avoid-redundancy.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ytechie.com/2008/06/using-var-to-simplify-code-and-avoid-redundancy.html</link>
	<description>Productive software development using ASP.NET, C#, Adobe Flex, and other technologies and tools.</description>
	<pubDate>Wed, 07 Jan 2009 14:16:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Josh Stodola</title>
		<link>http://www.ytechie.com/2008/06/using-var-to-simplify-code-and-avoid-redundancy.html#comment-541</link>
		<dc:creator>Josh Stodola</dc:creator>
		<pubDate>Wed, 25 Jun 2008 22:29:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.ytechie.com/2008/06/using-var-to-simplify-code-and-avoid-redundancy.html#comment-541</guid>
		<description>To hell with var.  If you don't like redundancy in your variable declarations, be a man and switch to the .NET superior: VB.</description>
		<content:encoded><![CDATA[<p>To hell with var.  If you don&#8217;t like redundancy in your variable declarations, be a man and switch to the .NET superior: VB.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JV</title>
		<link>http://www.ytechie.com/2008/06/using-var-to-simplify-code-and-avoid-redundancy.html#comment-540</link>
		<dc:creator>JV</dc:creator>
		<pubDate>Wed, 25 Jun 2008 20:48:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.ytechie.com/2008/06/using-var-to-simplify-code-and-avoid-redundancy.html#comment-540</guid>
		<description>I prefer to see "var" as a wolf in sheep clothes, some day it will bite you in your ase because of the issues you meant last.

Usings have more usages then just taking up space btw, it shows you your depencies and that's very usefull!</description>
		<content:encoded><![CDATA[<p>I prefer to see &#8220;var&#8221; as a wolf in sheep clothes, some day it will bite you in your ase because of the issues you meant last.</p>
<p>Usings have more usages then just taking up space btw, it shows you your depencies and that&#8217;s very usefull!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Obishawn</title>
		<link>http://www.ytechie.com/2008/06/using-var-to-simplify-code-and-avoid-redundancy.html#comment-539</link>
		<dc:creator>Obishawn</dc:creator>
		<pubDate>Wed, 25 Jun 2008 20:34:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.ytechie.com/2008/06/using-var-to-simplify-code-and-avoid-redundancy.html#comment-539</guid>
		<description>In regards to your last example, I just ran into that today where I had IShape shape = GetShape() where returned an object of type Shape.  The nice thing is, Resharper did not complain telling me I should have switched that to var.  It must have realized that I wanted to impose that kind of restriction on that object or something.  Funny thing is, I didn't mean to use the interface for that since GetShape() actually returned a Shape object, so I did convert to using var.

Another benefit falls where you said it might be questionable.  var data = GetData().  Let's say you had var data = repo.GetData() and it returned an object of type MyData where MyData is in a completely different name space.  Using var actually saves me an using for a single class (or having to type out the namespace before the class to avoid the namespace).

Hopefully that all made sense.</description>
		<content:encoded><![CDATA[<p>In regards to your last example, I just ran into that today where I had IShape shape = GetShape() where returned an object of type Shape.  The nice thing is, Resharper did not complain telling me I should have switched that to var.  It must have realized that I wanted to impose that kind of restriction on that object or something.  Funny thing is, I didn&#8217;t mean to use the interface for that since GetShape() actually returned a Shape object, so I did convert to using var.</p>
<p>Another benefit falls where you said it might be questionable.  var data = GetData().  Let&#8217;s say you had var data = repo.GetData() and it returned an object of type MyData where MyData is in a completely different name space.  Using var actually saves me an using for a single class (or having to type out the namespace before the class to avoid the namespace).</p>
<p>Hopefully that all made sense.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
