<?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>Kinnar Shah &#124; Blog &#187; Linq</title>
	<atom:link href="http://www.kinnarshah.in/index.php/tag/linq/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kinnarshah.in</link>
	<description>Just Another Geek With Just Another Blog...</description>
	<lastBuildDate>Fri, 13 Aug 2010 08:41:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<script type="text/javascript">
if (typeof Meebo == 'undefined') {
Meebo=function(){(Meebo._=Meebo._||[]).push(arguments)};
(function(q){

	var args = arguments;
	if (!document.body) { return setTimeout(function(){ args.callee.apply(this, args) }, 100); }
	var d=document, b=d.body, m=b.insertBefore(d.createElement('div'), b.firstChild); s=d.createElement('script');
	m.id='meebo'; m.style.display='none'; m.innerHTML='<iframe id="meebo-iframe"></iframe>';
	s.src='http'+(q.https?'s':'')+'://'+(q.stage?'stage-':'')+'cim.meebo.com/cim/cim.php?network='+q.network;
	b.insertBefore(s, b.firstChild);

})({network:'kinnarshahin_fi20ne'});	}</script>	<item>
		<title>Interesting Linq Problem</title>
		<link>http://www.kinnarshah.in/index.php/2009/11/04/interesting-linq-problem/</link>
		<comments>http://www.kinnarshah.in/index.php/2009/11/04/interesting-linq-problem/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 10:07:19 +0000</pubDate>
		<dc:creator>Kinnar Shah</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[question]]></category>

		<guid isPermaLink="false">http://www.kinnarshah.in/index.php/2009/11/04/interesting-linq-problem/</guid>
		<description><![CDATA[Check out the code below: using System.Linq; class Program { &#160; static void Main() &#160; {&#160; &#160;&#160;&#160;&#160;&#160; int[] data = { 1, 2, 3, 1, 2, 1 }; &#160;&#160;&#160;&#160;&#160; foreach (var m in from m in data orderby m select m) &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.Console.Write(m); &#160; } } Now, the question is: &#160; Is this code valid [...]]]></description>
			<content:encoded><![CDATA[<p>Check out the code below:</p>
<blockquote><p>using System.Linq;      <br />class Program       <br />{       <br />&#160; static void Main()       <br />&#160; {&#160; <br />&#160;&#160;&#160;&#160;&#160; int[] data = { 1, 2, 3, 1, 2, 1 };       <br />&#160;&#160;&#160;&#160;&#160; foreach (<strong>var m in from m in data orderby m select m</strong>)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.Console.Write(m);       <br />&#160; }       <br />}</p>
</blockquote>
<p>Now, the question is:</p>
<p><a href="http://www.kinnarshah.in/wp-content/uploads/2009/11/frustration3.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="frustration3" border="0" alt="frustration3" align="left" src="http://www.kinnarshah.in/wp-content/uploads/2009/11/frustration3_thumb.jpg" width="146" height="119" /></a>&#160; Is this code valid or not??</p>
<p>&#160; If valid, how?</p>
<p>&#160; If not valid, why?</p>
</p>
</p>
<p>(Source: Eric Lippert’s Blog)</p>
<img style='display:none' id="post-82-blankimage" onload="Meebo('discoverSharable', {element: ((this.parentNode.className.match('post')) ? this.parentNode : this.parentNode.parentNode) ,url:'http://www.kinnarshah.in/index.php/2009/11/04/interesting-linq-problem/',title:'Interesting Linq Problem',tweet:'Check out the code below: using System.Linq;      class Program       {       &#160; static void Mai',description:'Check out the code below: using System.Linq;      class Program       {       &#160; static void Mai'})"><script type='text/javascript'>document.getElementById("post-82-blankimage").onload();</script><p align="left"><a class="tt" href="http://twitter.com/home/?status=Interesting+Linq+Problem+www.e2pmx.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.kinnarshah.in/wp-content/plugins/tweet-this/icons/tt-twitter3.png" alt="Post to Twitter" /></a> <a class="tt" href="http://plurk.com/?status=Interesting+Linq+Problem+www.e2pmx.th8.us" title="Post to Plurk"><img class="nothumb" src="http://www.kinnarshah.in/wp-content/plugins/tweet-this/icons/tt-plurk.png" alt="Post to Plurk" /></a> <a class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.kinnarshah.in/index.php/2009/11/04/interesting-linq-problem/&amp;submitHeadline=Interesting+Linq+Problem" title="Post to Yahoo Buzz"><img class="nothumb" src="http://www.kinnarshah.in/wp-content/plugins/tweet-this/icons/tt-buzz.png" alt="Post to Yahoo Buzz" /></a> <a class="tt" href="http://delicious.com/post?url=http://www.kinnarshah.in/index.php/2009/11/04/interesting-linq-problem/&amp;title=Interesting+Linq+Problem" title="Post to Delicious"><img class="nothumb" src="http://www.kinnarshah.in/wp-content/plugins/tweet-this/icons/tt-delicious.png" alt="Post to Delicious" /></a> <a class="tt" href="http://digg.com/submit?url=http://www.kinnarshah.in/index.php/2009/11/04/interesting-linq-problem/&amp;title=Interesting+Linq+Problem" title="Post to Digg"><img class="nothumb" src="http://www.kinnarshah.in/wp-content/plugins/tweet-this/icons/tt-digg.png" alt="Post to Digg" /></a> <a class="tt" href="http://www.facebook.com/share.php?u=http://www.kinnarshah.in/index.php/2009/11/04/interesting-linq-problem/&amp;t=Interesting+Linq+Problem" title="Post to Facebook"><img class="nothumb" src="http://www.kinnarshah.in/wp-content/plugins/tweet-this/icons/tt-facebook.png" alt="Post to Facebook" /></a> <a class="tt" href="http://www.myspace.com/Modules/PostTo/Pages/?l=3&amp;u=http://www.kinnarshah.in/index.php/2009/11/04/interesting-linq-problem/&amp;t=Interesting+Linq+Problem&amp;c=%3Cp%3EPowered+by+%3Ca+href%3D%22http%3A%2F%2Frichardxthripp.thripp.com%2Ftweet-this%22%3ETweet+This%3C%2Fa%3E%3C%2Fp%3E" title="Post to MySpace"><img class="nothumb" src="http://www.kinnarshah.in/wp-content/plugins/tweet-this/icons/tt-myspace.png" alt="Post to MySpace" /></a> <a class="tt" href="http://ping.fm/ref/?method=microblog&amp;title=Interesting+Linq+Problem&amp;link=http://www.kinnarshah.in/index.php/2009/11/04/interesting-linq-problem/" title="Post to Ping.fm"><img class="nothumb" src="http://www.kinnarshah.in/wp-content/plugins/tweet-this/icons/tt-ping.png" alt="Post to Ping.fm" /></a> <a class="tt" href="http://reddit.com/submit?url=http://www.kinnarshah.in/index.php/2009/11/04/interesting-linq-problem/&amp;title=Interesting+Linq+Problem" title="Post to Reddit"><img class="nothumb" src="http://www.kinnarshah.in/wp-content/plugins/tweet-this/icons/tt-reddit.png" alt="Post to Reddit" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.kinnarshah.in/index.php/2009/11/04/interesting-linq-problem/&amp;title=Interesting+Linq+Problem" title="Post to StumbleUpon"><img class="nothumb" src="http://www.kinnarshah.in/wp-content/plugins/tweet-this/icons/tt-su.png" alt="Post to StumbleUpon" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.kinnarshah.in/index.php/2009/11/04/interesting-linq-problem/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
