<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Technical Rendezvous</title><subtitle type="html" /><id>http://blogs.msdn.com/rajivs/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/rajivs/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/rajivs/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2006-09-30T06:42:00Z</updated><entry><title>Dynamic Languages in .NET/Silverlight</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/rajivs/archive/2007/05/17/dynamic-languages-in-net-silverlight.aspx" /><id>http://blogs.msdn.com/rajivs/archive/2007/05/17/dynamic-languages-in-net-silverlight.aspx</id><published>2007-05-17T02:48:00Z</published><updated>2007-05-17T02:48:00Z</updated><content type="html">&lt;P&gt;&lt;A class="" href="http://silverlight.net/" mce_href="http://silverlight.net"&gt;Silverlight&lt;/A&gt;&amp;nbsp;supports various Dynamic languages like python, ruby, visual basic and jscript. &lt;/P&gt;
&lt;P&gt;See &lt;A class="" href="http://silverlight.net/Learn/learnvideo.aspx?video=147" mce_href="http://silverlight.net/Learn/learnvideo.aspx?video=147"&gt;here&lt;/A&gt; for a more detailed analysis on how Dynamic Languages run on top of the .NET Dynamic Language Runtime (DLR)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Also there is a msdn article that explains IronPython in detail &lt;A class="" href="http://msdn.microsoft.com/msdnmag/issues/06/10/CLRInsideOut/" mce_href="http://msdn.microsoft.com/msdnmag/issues/06/10/CLRInsideOut/"&gt;here. &lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2682902" width="1" height="1"&gt;</content><author><name>rajivs</name><uri>http://blogs.msdn.com/members/rajivs.aspx</uri></author></entry><entry><title>Silverlight on Windows Mobile!</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/rajivs/archive/2007/05/11/silverlight-on-windows-mobile.aspx" /><id>http://blogs.msdn.com/rajivs/archive/2007/05/11/silverlight-on-windows-mobile.aspx</id><published>2007-05-11T21:24:00Z</published><updated>2007-05-11T21:24:00Z</updated><content type="html">
&lt;p&gt;Yes, that's right, You can take &lt;a href="http://www.silverlight.net" mce_href="http://www.silverlight.net"&gt;Silverlight&lt;/a&gt; to go on your favorite Windows Mobile device.&amp;nbsp; See &lt;a href="http://blogs.msdn.com/scottholden/" mce_href="http://blogs.msdn.com/scottholden/"&gt;Scott Holden&lt;/a&gt; demo the prototype Silverlight MLB app on a Windows Mobile device.&amp;nbsp;&lt;a href="http://blogs.msdn.com/robunoki/" mce_href="http://blogs.msdn.com/robunoki/"&gt; Rob Unoki &lt;/a&gt;has more details about the demo in his blog &lt;a href="http://blogs.msdn.com/robunoki/archive/2007/05/01/silverlight-and-the-compact-framework.aspx" mce_href="http://blogs.msdn.com/robunoki/archive/2007/05/01/silverlight-and-the-compact-framework.aspx"&gt;here &lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Or if you are too lazy, the demo is right here...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;object height="350" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/LA3LlpClFko"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.youtube.com/v/LA3LlpClFko" type="application/x-shockwave-flash" wmode="transparent" height="350" width="425"&gt;&lt;/object&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2551045" width="1" height="1"&gt;</content><author><name>rajivs</name><uri>http://blogs.msdn.com/members/rajivs.aspx</uri></author><category term="Silverlight" scheme="http://blogs.msdn.com/rajivs/archive/tags/Silverlight/default.aspx" /></entry><entry><title>Power of Managed code!</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/rajivs/archive/2007/05/10/power-of-managed-code.aspx" /><id>http://blogs.msdn.com/rajivs/archive/2007/05/10/power-of-managed-code.aspx</id><published>2007-05-10T06:52:00Z</published><updated>2007-05-10T06:52:00Z</updated><content type="html">&lt;p&gt;&lt;a href="http://blogs.msdn.com/melsam/" mce_href="http://blogs.msdn.com/melsam/"&gt;Mel Sampat&lt;/a&gt;, a Program Manager @ Microsoft shows off Windows Mobile 6 and power of managed code. He shows off a sample managed application that does expense tracking. It uses managed voice recognition API's to provide voice recognition support. The demo is very cool and shows how powerful the .NET Compact framework is and how it enables application developers to write truly amazing applications on top of the .NET compact framework. &lt;a href="http://weblogs.asp.net/scottgu/" mce_href="http://weblogs.asp.net/scottgu/"&gt;Scott Guthrie&lt;/a&gt;&amp;nbsp; @ Mix says that Microsoft is a platform company, this is one of many reasons why that statement is absolutely true.&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://channel9.msdn.com/ShowPost.aspx?PostID=303900" mce_href="http://channel9.msdn.com/ShowPost.aspx?PostID=303900"&gt;http://channel9.msdn.com/ShowPost.aspx?PostID=303900&amp;nbsp;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;If you want to skip the initial part and go straightaway to the demo, goto 13:30sec in the video.&lt;br&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2516413" width="1" height="1"&gt;</content><author><name>rajivs</name><uri>http://blogs.msdn.com/members/rajivs.aspx</uri></author><category term="Managed Code" scheme="http://blogs.msdn.com/rajivs/archive/tags/Managed+Code/default.aspx" /></entry><entry><title>My favourite XNA game</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/rajivs/archive/2007/05/10/my-favourite-xna-game.aspx" /><id>http://blogs.msdn.com/rajivs/archive/2007/05/10/my-favourite-xna-game.aspx</id><published>2007-05-10T06:04:00Z</published><updated>2007-05-10T06:04:00Z</updated><content type="html">&lt;p&gt;This XNA game is simply amazing and cool!&lt;/p&gt;&lt;p&gt;&amp;nbsp;For more see XNA team blog&amp;nbsp; &lt;a href="http://blogs.msdn.com/xna/" mce_href="http://blogs.msdn.com/xna/"&gt;http://blogs.msdn.com/xna/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;object height="350" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/TgChURF5fQE"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.youtube.com/v/TgChURF5fQE" mce_src="http://www.youtube.com/v/TgChURF5fQE" type="application/x-shockwave-flash" wmode="transparent" height="350" width="425"&gt;&lt;/object&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2515459" width="1" height="1"&gt;</content><author><name>rajivs</name><uri>http://blogs.msdn.com/members/rajivs.aspx</uri></author><category term="XNA" scheme="http://blogs.msdn.com/rajivs/archive/tags/XNA/default.aspx" /></entry><entry><title>Getting started with Language Integrated Query (LINQ) in .NET Compact framework 3.5</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/rajivs/archive/2007/05/10/getting-started-with-language-integrated-query-linq-in-net-compact-framework-3-5.aspx" /><id>http://blogs.msdn.com/rajivs/archive/2007/05/10/getting-started-with-language-integrated-query-linq-in-net-compact-framework-3-5.aspx</id><published>2007-05-10T05:50:00Z</published><updated>2007-05-10T05:50:00Z</updated><content type="html">&lt;P class=MsoNormal&gt;.NET Compact framework 3.5 support s the Language Integrated querying mechanism which allows developers to query a collection of enumerable objects through a set of predefined operators. LINQ has a set of operators that allows you to traverse, filter and select an enumerable collection using a syntax that is very similar to SQL. This makes it easy for developers to perform complex querying and selecting operations on a collection of enumerable objects easily. &lt;/P&gt;
&lt;P class=MsoNormal&gt;Enough said, let us look at a bit of code that will explain things better.&lt;/P&gt;
&lt;P class=MsoNormal mce_keep="true"&gt;Yesterday, I bumped into a real world scenario where I had to print out the list of files in a directory that had an extension &lt;B&gt;.cs &lt;/B&gt;or &lt;B&gt;.vb.&lt;/B&gt; In the olden days (err back in .NET 2.0 days, not long ago &lt;SPAN style="FONT-FAMILY: Wingdings"&gt;&lt;SPAN&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt;), I would’ve done something like this&lt;/P&gt;
&lt;P class=MsoNormal mce_keep="true"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;string&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;[] &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;files &lt;SPAN style="COLOR: blue"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;= &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;Directory&lt;/SPAN&gt;.GetFiles(&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;@"\temp"&lt;/SPAN&gt;);&lt;?xml:namespace prefix = o /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;BR&gt;foreach&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(43,145,175); FONT-FAMILY: 'Courier New'"&gt; (&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; file &lt;SPAN style="COLOR: blue"&gt;in&lt;/SPAN&gt; files)&lt;o:p&gt;&lt;/o:p&gt;&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileInfo&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; fi = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;FileInfo&lt;/SPAN&gt;(file);&lt;o:p&gt;&lt;/o:p&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(43,145,175); FONT-FAMILY: 'Courier New'"&gt; (fi.Extension.ToLower() == &lt;SPAN style="COLOR: rgb(163,21,21)"&gt;".cs"&lt;/SPAN&gt; ||&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fi.Extension.ToLower() == &lt;SPAN style="COLOR: rgb(163,21,21)"&gt;".vb"&lt;/SPAN&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Console&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;.WriteLine(fi.Name);&lt;o:p&gt;&lt;/o:p&gt;&lt;BR&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;Armed with LINQ, I can do the same thing in the following way&lt;/P&gt;
&lt;P class=MsoNormal mce_keep="true"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;var&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;files &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;= &lt;SPAN style="COLOR: blue"&gt;from&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;file &lt;SPAN style="COLOR: blue"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="COLOR: blue"&gt;in&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;Directory&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;GetFiles&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;(&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;@"\temp"&lt;/SPAN&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;BR&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;let&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;fi =&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;FileInfo&lt;/SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;file&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;BR&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;where&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;fi.Extension.ToLower() == &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;".cs"&lt;/SPAN&gt; || &lt;o:p&gt;&lt;/o:p&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fi.Extension.ToLower() == &lt;SPAN&gt;".vb"&lt;o:p&gt;&lt;/o:p&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;select&lt;/SPAN&gt; fi.Name;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal mce_keep="true"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;foreach&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; (&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; file &lt;SPAN style="COLOR: blue"&gt;in&lt;/SPAN&gt; files)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(43,145,175)"&gt;Console&lt;/SPAN&gt;.WriteLine(file);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;As you can see from the extremely simple example, LINQ provides a simple and an elegant way to query collection of enumerable items, in this case it is the list of files (array of strings) returned by the Directory.GetFiles method. &lt;/P&gt;
&lt;P class=MsoNormal&gt;All right, this might be trivial and you might be wondering why would you need to consider learning this when you could’ve just as easily done this the old fashioned way.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;The interesting thing (or I call it the *aha* factor) is that you could achieve more complex filtering and selection much more easily than the old fashioned way. &lt;/P&gt;
&lt;P mce_keep="true"&gt;Consider this case where you need to not only print out the list of files that has an extension .cs or .vb, but you need to print out the list of files that start with the letter ‘s’ and has a .cs or .vb extension sorted descending . &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Try doing this, the old fashioned way &lt;SPAN style="FONT-FAMILY: Wingdings"&gt;&lt;SPAN&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/P&gt;
&lt;P class=MsoNormal&gt;With LINQ, All I have to do is&lt;/P&gt;
&lt;P class=MsoNormal style="TEXT-INDENT: 0.5in"&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;var&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; sortedFiles = &lt;SPAN style="COLOR: blue"&gt;from&lt;/SPAN&gt; file &lt;SPAN style="COLOR: blue"&gt;in&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;Directory&lt;/SPAN&gt;.GetFiles(&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;@"\temp"&lt;/SPAN&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;BR&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;let&lt;/SPAN&gt; fi = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;FileInfo&lt;/SPAN&gt;(file)&lt;o:p&gt;&lt;/o:p&gt;&lt;BR&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;where&lt;/SPAN&gt; fi.Name.ToLower().StartsWith(&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;"s"&lt;/SPAN&gt;) &amp;amp;&amp;amp;&lt;o:p&gt;&lt;/o:p&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (fi.Extension.ToLower() == &lt;SPAN style="COLOR: rgb(163,21,21)"&gt;".cs"&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; || &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;fi.Extension.ToLower() == &lt;SPAN style="COLOR: rgb(163,21,21)"&gt;".vb"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;BR&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;orderby&lt;/SPAN&gt; fi.Name &lt;SPAN style="COLOR: blue"&gt;descending&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;BR&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;select&lt;/SPAN&gt; fi.Name;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;foreach&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: rgb(43,145,175); LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt; (&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; file &lt;SPAN style="COLOR: blue"&gt;in&lt;/SPAN&gt; sortedFiles)&lt;o:p&gt;&lt;/o:p&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;.WriteLine(file);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal mce_keep="true"&gt;In VB.NET&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;Dim&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;sortedFiles&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;= &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;From&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;file &lt;SPAN style="COLOR: blue"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="COLOR: blue"&gt;In&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;Directory.GetFiles("\temp") _&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;From&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;fi = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="COLOR: blue"&gt;New&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;FileInfo(file) _&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; Where&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; &lt;SPAN style="COLOR: blue"&gt;&lt;/SPAN&gt;fi.Name.ToLower().StartsWith(&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;"s"&lt;/SPAN&gt;) &lt;SPAN style="COLOR: blue"&gt;And &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;_&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;fi.Extension.ToLower() = &lt;SPAN style="COLOR: rgb(163,21,21)"&gt;".cs"&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;_&lt;/SPAN&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; Or&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; f&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;i.Extension.ToLower() = &lt;SPAN style="COLOR: rgb(163,21,21)"&gt;".vb"&lt;/SPAN&gt;) _&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;BR&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;Order&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;By&lt;/SPAN&gt; fi.Name &lt;SPAN style="COLOR: blue"&gt;Descending&lt;/SPAN&gt; _&lt;o:p&gt;&lt;/o:p&gt;&lt;BR&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; Select&lt;/SPAN&gt; fi.Name&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal mce_keep="true"&gt;Voila, I was able to do this in 2 lines (technically) of simple intuitive code with LINQ. Without it, I would’ve had to create of array of string that had the list of files that match the criteria, then sort it and then print it.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;By now you should see the how greatly LINQ simplifies this kind of collection based operations.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;There are more complex operators supported by LINQ, for instance you can use &lt;B&gt;group &lt;/B&gt;operator to group elements in a query. I will talk more about those operators in the future blog posts. Personally I don’t like reading blogs that span more than a single page. I like to factor things out just like we do when we code every day. So this is just an introductory post to get you guys started with LINQ. &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;So Jump in, download the latest version of Visual Studio code name “Orcas” and start exploring LINQ.&lt;/P&gt;
&lt;P class=MsoNormal mce_keep="true"&gt;Note: LINQ is a new feature of VB 9.0 compiler and c# 3.0 compiler that ships with .NET Framework 3.5. Not all features that are supported by the desktop .NET Framework is supported by .NET Compact framework.&lt;/P&gt;
&lt;P class=MsoNormal mce_keep="true"&gt;For more info, look @ &lt;A href="http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx" mce_href="http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx"&gt;http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal mce_keep="true"&gt;&lt;SPAN style="FONT-SIZE: 7.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal mce_keep="true"&gt;&lt;SPAN style="FONT-SIZE: 7.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Disclaimers:&lt;BR&gt;This posting is provided "AS IS" with no warranties, and confers no rights.&lt;BR&gt;The information contained within this post is in relation to beta software.&amp;nbsp; Any and all details are subject to change.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2515262" width="1" height="1"&gt;</content><author><name>rajivs</name><uri>http://blogs.msdn.com/members/rajivs.aspx</uri></author><category term="LINQ" scheme="http://blogs.msdn.com/rajivs/archive/tags/LINQ/default.aspx" /></entry><entry><title>Hello Solar system (miss you Pluto!)</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/rajivs/archive/2006/09/30/777851.aspx" /><id>http://blogs.msdn.com/rajivs/archive/2006/09/30/777851.aspx</id><published>2006-09-30T08:42:00Z</published><updated>2006-09-30T08:42:00Z</updated><content type="html">&lt;P&gt;Hello Everyone! &lt;/P&gt;
&lt;P&gt;This is my first (of hopefully many more to come) blog post here @ blogs.msdn.com. Without rambling forever, here is a brief overview of me&lt;/P&gt;
&lt;P&gt;whoami : I'm Rajiv Srinivasan working with the NETCF team as a&amp;nbsp;Software Development Engineer in Test&amp;nbsp;here in MS Redmond , WA&lt;/P&gt;
&lt;P&gt;I just joined MS couple of months ago, so technically I'm still a newbie around here. I went to the University of Minnesota in Minneapolis MN and worked for Thomson Corp for about a year and a half before I moved to MS. I own most of the core areas in NETCF including Garbage Collector, LINQ (Language Integrated Query--&amp;gt; new feature in Orcas which is the next version of .NET --&amp;gt; .NET 3.5 ),&amp;nbsp; System I/O. &lt;/P&gt;
&lt;P&gt;I will mostly blog about NETCF here in this blog as and when I find interesting things that will help anyone who is interested in developing managed applications for mobile devices. I hope my blog will be useful to the developer community in general. Please feel free to provide&amp;nbsp;feedback about how to improve this blog. &lt;/P&gt;
&lt;P&gt;Adios amigos!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=777851" width="1" height="1"&gt;</content><author><name>rajivs</name><uri>http://blogs.msdn.com/members/rajivs.aspx</uri></author></entry></feed>