<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: var Keyword In C#</title>
	<atom:link href="http://www.onedotnetway.com/var-keyword-in-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.onedotnetway.com/var-keyword-in-c/</link>
	<description>Everything .Net</description>
	<lastBuildDate>Mon, 09 Jan 2012 00:09:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Deepak</title>
		<link>http://www.onedotnetway.com/var-keyword-in-c/comment-page-1/#comment-13244</link>
		<dc:creator>Deepak</dc:creator>
		<pubDate>Thu, 10 Dec 2009 22:32:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.onedotnetway.com/var-keyword-in-c/#comment-13244</guid>
		<description>Hi JohnG,

Thanks for your comment. I am also a believer of readable code and I find var to be elegant in certain situations. Of course a balance has to be provided.</description>
		<content:encoded><![CDATA[<p>Hi JohnG,</p>
<p>Thanks for your comment. I am also a believer of readable code and I find var to be elegant in certain situations. Of course a balance has to be provided.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JohnG</title>
		<link>http://www.onedotnetway.com/var-keyword-in-c/comment-page-1/#comment-13234</link>
		<dc:creator>JohnG</dc:creator>
		<pubDate>Thu, 10 Dec 2009 17:44:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.onedotnetway.com/var-keyword-in-c/#comment-13234</guid>
		<description>In my experience &quot;var&quot; makes code more readable. I find it quite obvious to get the type.   The only dubious use of &quot;var&quot; to me is potentially the return type of a method call where it isn&#039;t clear what the method is returning.  Still a well written method name can help a lot (without adding the return type to the name).

If I see  var message = GetMessage();   I would generally infer a string.

I am a big believer in preferring readable code over code comments but I find overly verbose code less readable.  The less cluttered the code the more readable it is to me.

And I have to look at a lot of other peoples&#039; code in code review.
In my industry we do a lot of code review and I am very pleased when people use var  I do not find it in anyway a hindrance.</description>
		<content:encoded><![CDATA[<p>In my experience &#8220;var&#8221; makes code more readable. I find it quite obvious to get the type.   The only dubious use of &#8220;var&#8221; to me is potentially the return type of a method call where it isn&#8217;t clear what the method is returning.  Still a well written method name can help a lot (without adding the return type to the name).</p>
<p>If I see  var message = GetMessage();   I would generally infer a string.</p>
<p>I am a big believer in preferring readable code over code comments but I find overly verbose code less readable.  The less cluttered the code the more readable it is to me.</p>
<p>And I have to look at a lot of other peoples&#8217; code in code review.<br />
In my industry we do a lot of code review and I am very pleased when people use var  I do not find it in anyway a hindrance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deepak</title>
		<link>http://www.onedotnetway.com/var-keyword-in-c/comment-page-1/#comment-1372</link>
		<dc:creator>Deepak</dc:creator>
		<pubDate>Thu, 19 Feb 2009 23:16:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.onedotnetway.com/var-keyword-in-c/#comment-1372</guid>
		<description>Jason,

I could not agree more with you. You have to use var judiciously. It adds most value when working with anonymous types. I do not have problems using var once in a while but I stay away from using it for every declaration.</description>
		<content:encoded><![CDATA[<p>Jason,</p>
<p>I could not agree more with you. You have to use var judiciously. It adds most value when working with anonymous types. I do not have problems using var once in a while but I stay away from using it for every declaration.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Json</title>
		<link>http://www.onedotnetway.com/var-keyword-in-c/comment-page-1/#comment-1370</link>
		<dc:creator>Json</dc:creator>
		<pubDate>Thu, 19 Feb 2009 20:57:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.onedotnetway.com/var-keyword-in-c/#comment-1370</guid>
		<description>But really...what&#039;s the point of using var on something of known type? Like you said, var is specialized for dynamic frameworks and languages like Lambda and LINQ, where you don&#039;t know what&#039;s coming back. 

When you do something like:
var myName = &quot;Json&quot;;   //what tha hell is the point of this?

It DOES make code hard to read when var is applied out of context.
There is no logical reason not to put:
string myName = &quot;Json&quot;; 

You don&#039;t buy anything beneficial from using var for KNOWN data types. Because on the right side of the equal sign guess what, you KNOW the data type. It&#039;s silly...</description>
		<content:encoded><![CDATA[<p>But really&#8230;what&#8217;s the point of using var on something of known type? Like you said, var is specialized for dynamic frameworks and languages like Lambda and LINQ, where you don&#8217;t know what&#8217;s coming back. </p>
<p>When you do something like:<br />
var myName = &#8220;Json&#8221;;   //what tha hell is the point of this?</p>
<p>It DOES make code hard to read when var is applied out of context.<br />
There is no logical reason not to put:<br />
string myName = &#8220;Json&#8221;; </p>
<p>You don&#8217;t buy anything beneficial from using var for KNOWN data types. Because on the right side of the equal sign guess what, you KNOW the data type. It&#8217;s silly&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

