<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Mircea Trofin's blog</title><link>http://blogs.msdn.com/mirceat/default.aspx</link><description /><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Tools for Framework Architecture Verification</title><link>http://blogs.msdn.com/mirceat/archive/2008/08/04/tools-for-framework-architecture-verification.aspx</link><pubDate>Mon, 04 Aug 2008 19:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8831401</guid><dc:creator>mirceat</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mirceat/comments/8831401.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mirceat/commentrss.aspx?PostID=8831401</wfw:commentRss><description>&lt;P&gt;The beans have been actually &lt;A class="" href="http://blogs.msdn.com/brada/archive/2008/08/03/new-tools-for-framework-designers-published.aspx" mce_href="http://blogs.msdn.com/brada/archive/2008/08/03/new-tools-for-framework-designers-published.aspx"&gt;spilled already&lt;/A&gt;&amp;nbsp;- I was working on a few command line tools for framework architecture verification, to help with my own work. We decided to make them available for download. They can be found on Code Gallery: &lt;A href="http://code.msdn.microsoft.com/fxarch"&gt;http://code.msdn.microsoft.com/fxarch&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Hope you find them useful!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8831401" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mirceat/archive/tags/framework+architecture/default.aspx">framework architecture</category></item><item><title>The Managed Extensibility Framework (MEF) CTP is out!</title><link>http://blogs.msdn.com/mirceat/archive/2008/06/05/the-managed-extensibility-framework-mef-ctp-is-out.aspx</link><pubDate>Thu, 05 Jun 2008 03:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8574338</guid><dc:creator>mirceat</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mirceat/comments/8574338.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mirceat/commentrss.aspx?PostID=8574338</wfw:commentRss><description>&lt;p&gt;Krzysztof has &lt;a href="http://blogs.msdn.com/kcwalina/archive/2008/04/25/MEF.aspx" mce_href="http://blogs.msdn.com/kcwalina/archive/2008/04/25/MEF.aspx"&gt;blogged &lt;/a&gt;about the Managed Extensibility Framework (MEF) a while ago. Today, the Application Framework Core team has published the first Community Technical Preview (CTP) of MEF!&lt;/p&gt;&lt;p&gt;For those that are not familiar with the topic, MEF "&lt;span id="ctl00_ctl00_Content_TabContentPanel_Content_wikiSourceLabel"&gt;provides
developers with a tool to easily add extensibility to their
applications and with minimal impact on existing code. The application
developer can define extension points according to the functionality
required of an extension, while the extension developer uses those
points to interact with the application.&lt;br&gt; &lt;br&gt;MEF enables this
extensibility to take place without creating a hard dependency in
either direction. Applications can be extended at run time without
recompilation, and extensions can be used by multiple applications
sharing the same extension requirements. MEF also allows an application
to delay the loading of an extension while still examining its
metadata, enabling efficient traversal of large catalogs of extensions."&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br&gt;&lt;span id="ctl00_ctl00_Content_TabContentPanel_Content_wikiSourceLabel"&gt;&lt;/span&gt;Check it out! &lt;a href="http://code.msdn.microsoft.com/mef" mce_href="http://code.msdn.microsoft.com/mef"&gt;Download&lt;/a&gt; the CTP and &lt;a href="http://forums.msdn.microsoft.com/en-US/MEFramework/threads" mce_href="http://forums.msdn.microsoft.com/en-US/MEFramework/threads"&gt;discuss &lt;/a&gt;it!&lt;br&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8574338" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mirceat/archive/tags/MEF/default.aspx">MEF</category></item><item><title>LINQ Framework Design Guidelines</title><link>http://blogs.msdn.com/mirceat/archive/2008/03/13/linq-framework-design-guidelines.aspx</link><pubDate>Thu, 13 Mar 2008 05:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8177610</guid><dc:creator>mirceat</dc:creator><slash:comments>20</slash:comments><comments>http://blogs.msdn.com/mirceat/comments/8177610.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mirceat/commentrss.aspx?PostID=8177610</wfw:commentRss><description>&lt;P style="MARGIN: 10pt 0in 0pt" class=BodyOpener&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;Writing applications that interact with data sources, such as databases, XML documents, or Web Services such as Flickr or Amazon, is made easier in the .NET Framework 3.5 with the addition of a set of features collectively referred to as LINQ (&lt;B style="mso-bidi-font-weight: normal"&gt;L&lt;/B&gt;anguage-&lt;B style="mso-bidi-font-weight: normal"&gt;In&lt;/B&gt;tegrated &lt;B style="mso-bidi-font-weight: normal"&gt;Q&lt;/B&gt;uery). In what follows, we start with a very brief overview of LINQ, followed by guidelines for designing APIs in relation to LINQ. &lt;?xml:namespace prefix = o /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H2 style="MARGIN: 24pt 0in 12pt 0.25in"&gt;&lt;FONT color=#4f81bd&gt;&lt;SPAN style="mso-fareast-font-family: Cambria; mso-fareast-theme-font: major-latin; mso-bidi-font-family: Cambria; mso-bidi-theme-font: major-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=4 face=Cambria&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=4 face=Cambria&gt;A Brief Overview of LINQ&lt;/FONT&gt;&lt;/FONT&gt;&lt;/H2&gt;
&lt;P style="MARGIN: 10pt 0in 0pt" class=BodyFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;Quite often, programming requires processing over sets of values. Some probably well known examples include: extracting the list of the most recently added books from a database of products; or finding the email address of a person in a directory service such as Active Directory; or transforming parts of an XML document to HTML to allow for web publishing; or something as frequent as looking up a value in a hash table. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 10pt 0in 0pt" class=BodyFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;LINQ allows for a uniform, language-integrated programming model with data, independent of the technology used to store that data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 10pt 0in 0pt" class=BodyFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;In terms of concrete libraries, LINQ is embodied as:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 10pt 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo3" class=BodyFirst&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;A specification in C# and VB of the notion of “extension methods”&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 10pt 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo3" class=BodyFirst&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;The Query Pattern, a specification of the set of methods a type must provide in order to be considered as a LINQ provider. The names of these methods can be found in &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;System.Linq.Enumerable&lt;/SPAN&gt;&lt;FONT face=Batang&gt; (found in &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;System.Core.dll&lt;/SPAN&gt;&lt;FONT face=Batang&gt;). Their signature follows a pattern that will be discussed later in this chapter.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 10pt 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo3" class=BodyFirst&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;A definition of a new interface, &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;IQueryable&amp;lt;T&amp;gt;:IEnumerable&amp;lt;T&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 10pt 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo3" class=BodyFirst&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;New types representing generic delegates: &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;Func&amp;lt;&amp;gt; &lt;/SPAN&gt;&lt;FONT face=Batang&gt;and &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;Action&amp;lt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 10pt 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo3" class=BodyFirst&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;Lambda expressions, a language feature in VB and C# for defining anonymous delegates&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 10pt 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo3" class=BodyFirst&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;A type representing the notion of a delay-compiled delegate, the &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;Expression&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt; family of types.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 10pt 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo3" class=BodyFirst&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;An extension to the C# and VB syntax allowing for queries to be expressed in an alternative, SQL-like format. For example (C#):&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 5pt 0in 0pt 30.25pt" class=DO-codefirstCxSpFirst&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;//using extension methods:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codefirstCxSpMiddle&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;IEnumerable&amp;lt;string&amp;gt; names = set.Where(x=&amp;gt;x.Age&amp;gt;20).Select(x=&amp;gt;x.Name);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codefirstCxSpMiddle&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;o:p&gt;&lt;FONT face=Courier&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codefirstCxSpMiddle&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;//using SQL-like syntax:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codefirstCxSpMiddle&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;IEnumerable&amp;lt;string&amp;gt; names = from x in set where x.Age&amp;gt;20 &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codefirstCxSpLast&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;&lt;SPAN style="mso-tab-count: 6"&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;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;select x.Name; &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=Code&gt;&lt;o:p&gt;&lt;FONT face=Courier&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 6pt 12.25pt" class=DO-2ndpara&gt;&lt;FONT size=3&gt;&lt;FONT face=Batang&gt;The interplay between these features is the following: any &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;IEnumerable&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt; can be queried upon using the LINQ extension methods, most of which require one or more lambda expressions as parameters; this leads to an in-memory, generic evaluation of the queries. For cases where the set of data is not in memory (e.g. in a database), and/or queries may be optimized, the set of data is presented as an &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;IQueryable&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;. If lambda expressions are given as parameters, they are transformed by the compiler to &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;Expression&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt; objects. The implementation of &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;IQueryable&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt; is responsible for processing said expressions. For example, the implementation of an &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;IQueryable&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt; representing a database table would translate &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;Expression&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt; objects to SQL queries.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;o:p&gt;&lt;FONT face=Batang&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;H2 style="MARGIN: 24pt 0in 12pt 0.25in"&gt;&lt;FONT color=#4f81bd&gt;&lt;SPAN style="mso-fareast-font-family: Cambria; mso-fareast-theme-font: major-latin; mso-bidi-font-family: Cambria; mso-bidi-theme-font: major-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=4 face=Cambria&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=4 face=Cambria&gt;Extension Methods, Func&amp;lt;&amp;gt;, Action&amp;lt;&amp;gt;, and Expression&amp;lt;&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/H2&gt;
&lt;P style="MARGIN: 10pt 0in 0pt" class=BodyFirst&gt;&lt;FONT face=Batang&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;Extension methods&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt; constitute a language feature that allows static methods to be invoked on instance variables. These methods must take at least one parameter, which represents the instance the method is to operate on. For example, in C#, this is done by using the &lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;this&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt; modifier on such a parameter, when defining the method:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 6pt 0in 0pt 15.1pt" class=CodeFirstCxSpFirst&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;public static bool IsPalindrome(&lt;B style="mso-bidi-font-weight: normal"&gt;this&lt;/B&gt; string s){&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 15.1pt" class=CodeFirstCxSpMiddle&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;//implementation follows here&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 15.1pt" class=CodeFirstCxSpLast&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 10pt 0in 6pt" class=Body&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;This example allows one to write, for example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 6pt 0in 0pt 15.1pt" class=CodeFirst&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;“some string”.IsPalindrome();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 10pt 0in 0pt" class=BodyCxSpFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;o:p&gt;&lt;FONT face=Batang&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=BodyCxSpMiddle&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;...which in this case would result in &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;false&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt; being displayed on the console.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=BodyCxSpMiddle&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;o:p&gt;&lt;FONT face=Batang&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=BodyCxSpMiddle&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;The class that defines such extension methods is referred to in this text as “sponsor” class, and it must be declared as static. To use extension methods, one must import the namespace defining their sponsor class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=BodyCxSpMiddle&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;o:p&gt;&lt;FONT face=Batang&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 6pt" class=BodyCxSpLast&gt;&lt;FONT face=Batang&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;Func&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt; objects represent a generic delegate. For example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 6pt 0in 0pt 15.1pt" class=CodeFirstCxSpFirst&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;Func&amp;lt;int,int,double&amp;gt; divide=(x,y)=&amp;gt;(double)x/(double)y;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 15.1pt" class=CodeFirstCxSpLast&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;Console.WriteLine(divide(2,3));&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 10pt 0in 6pt" class=Body&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;In this example, divide is a function that takes two integers and returns a double. The last parameter in the generic definition of a &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Func&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt; is always the return type. To represent void-returning functions, use &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Action&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt; instead. For example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 6pt 0in 0pt 15.1pt" class=CodeFirstCxSpFirst&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;Action&amp;lt;double&amp;gt; write=(aDouble)=&amp;gt;Console.WriteLine(aDouble);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 15.1pt" class=CodeFirstCxSpLast&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;write(divide(2,3));&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 10pt 0in 6pt" class=Body&gt;&lt;FONT face=Batang&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;Expression&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt; objects represent function definitions that can be compiled and subsequently invoked at runtime. Continuing with our example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 6pt 0in 0pt 15.1pt" class=CodeFirstCxSpFirst&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;Expression&amp;lt;Func&amp;lt;int,int,double&amp;gt;&amp;gt; divideBody=(x,y)=&amp;gt;(double)x/(double)y;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 15.1pt" class=CodeFirstCxSpMiddle&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;Func&amp;lt;int,int,double&amp;gt; divide2=divideBody.Compile();&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 15.1pt" class=CodeFirstCxSpLast&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;write(divide2(2,3));&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 14pt 0in 0pt; mso-add-space: auto" class=BodyCxSpFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;Notice how the syntax for constructing an &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Expression&amp;lt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;object is very similar to the one used to construct a &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Func&amp;lt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;object; in fact, the only difference is the static type declaration of the variable (&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Expression&amp;lt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;instead of &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Func&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;). &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 14pt 0in 0pt; mso-add-space: auto" class=BodyCxSpMiddle&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;o:p&gt;&lt;FONT face=Batang&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 14pt 0in 6pt; mso-add-space: auto" class=BodyCxSpLast&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;Expressions may also be constructed programmatically, using the predefined static methods of the non-generic &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Expression&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt; class, however, this is a topic that does not need to be covered for our purposes here. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN class=DO1&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: red; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;ý&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: red; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Avoid&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt; frivolous use of the extension methods feature when defining methods on a new type. Use the canonical, language-specific means for defining type members.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;There are a few reasons for this. The main one is that liberal use of extension methods has the potential of cluttering the API of types. Another reason is that extension methods are a compile-time facility, and not all languages provide support for them. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;There are, of course, scenarios in which extension methods should be employed. These are outlined in what follows. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;þ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Consider&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt; using extension methods in any of the following scenarios:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo4" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Symbol; mso-font-width: 100%; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;to provide helper functionality relevant to every implementation of an interface, if said functionality can be written in terms of the core interface. This is because concrete implementations cannot otherwise be assigned to interfaces. For example, the LINQ to Objects operators are implemented as extension methods for all &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt; types. Thus, any &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IEnumerable&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt; implementation is automatically LINQ-enabled&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo4" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Symbol; mso-font-width: 100%; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;when object model considerations would dictate taking a dependency on some assembly, but taking such a dependency would break dependency management rules.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 0.5in; TEXT-INDENT: 0in" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;For example, consider the domain of telecommunications. Let us consider that a core domain-specific model is that of network nodes. A library is defined for this domain, called &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;nodes.dll&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;. The library contains types such as &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Node&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;. &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Node&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt; may have properties such as “address” and “manufacturer”, etc. Now consider the problem of establishing communication paths through such a network (i.e. routing). A second library, &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;routing.dll&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;, is thus developed, taking a dependency on &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;nodes.dll&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;. Good engineering practice dictates that &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;nodes.dll &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;not take a dependency on &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;routing.dll&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;. &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;However, it could be imagined that, in the domain of path routing, the model for network nodes may have new characteristics, namely, that of being or not a path endpoint, and that of being associated with a number of paths. To maintain clean dependencies, a possibility is to have static methods defined in &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;routing.dll&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;, e.g. &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Paths.IsNodePathEndpoint(Node n)&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt; or &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Paths.GetListOfPathsCrossingNode(Node n)&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;. However, it may be considered more natural to simply have methods like &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IsEndpoint()&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt; defined on &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Node&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;. Defining extension methods on the Node type in the paths library is, thus, the option to be considered.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN class=DO1&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: red; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;ý&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: red; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Avoid&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt; defining extension methods on &lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;System.Object&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;, unless absolutely necessary. When doing so, be aware that VB users will not be able to use thus-defined extension methods and, as such, they will not be able to take advantage of usability/syntax benefits that come with extension methods.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;This is because, in VB, declaring a variable as &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;object&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt; forces all method invocations on it to be late bound – while bindings to extension methods are compile-time determined (early bound). For example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;public static class SomeExtensions{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;static void Foo(this object o){…}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Object o = …&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;o.Foo();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;In this example, the call to &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Foo&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt; will fail in VB. Instead, the VB syntax should simply be:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;SomeExtensions.Foo(o)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Courier; mso-font-width: 100%; mso-bidi-font-family: Courier"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;Note that the guideline applies to other languages where the same binding behavior is present, or where extension methods are not supported.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN class=DO1&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: red; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;ý&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: red; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Do not&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt; put extension methods in the same namespace as the extended type, unless it is for adding methods to interfaces, or for dependency management. In the latter case, the type would be in a different assembly. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DO&gt;&lt;SPAN class=DO1&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: red; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;ý&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: red; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Avoid&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt; redefining extension methods on a type &lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;T&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt; with extension methods on the same type. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DO&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;For example, in C#, if two different namespaces defined the same extension method on the same type, it would be impossible to import both namespaces in the same file – the compiler would report an ambiguity.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;&amp;lt;file 1&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;namespace A{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;public static class ExtMethodsInA{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;&lt;SPAN style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;public static void ExtMethod(this T obj){…}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;&amp;lt;file 2&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;namespace B{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;public static class ExtMethodsInB{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;&lt;SPAN style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;static void ExtMethod(this T obj){…}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;&amp;lt;file 3&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;using A;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;using B;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;This will fail at compile time, since &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;ExtMethod&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt; is considered to be defined twice. This may break valid reusability scenarios; if the scenarios occur late in the development cycle, refactoring namespaces may prove costly. It is thus preferable to avoid this form of overriding methods.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 10pt 0in 0pt" class=BodyFirst&gt;&lt;FONT face=Batang&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Courier; mso-font-width: 100%; mso-bidi-font-family: Courier"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;TABLE style="MARGIN: auto auto auto 9pt; BORDER-COLLAPSE: collapse; mso-table-layout-alt: fixed; mso-yfti-tbllook: 1184; mso-padding-alt: 9.0pt 9.0pt 9.0pt 9.0pt" class=MsoNormalTable border=0 cellSpacing=0 cellPadding=0 class="MsoNormalTable"&gt;
&lt;TBODY&gt;
&lt;TR style="HEIGHT: 132pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;
&lt;TD style="BORDER-RIGHT: black 3pt solid; PADDING-RIGHT: 9pt; PADDING-LEFT: 9pt; BORDER-TOP: black 3pt solid; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 9pt; BORDER-LEFT: black 3pt solid; WIDTH: 351pt; PADDING-TOP: 9pt; BORDER-BOTTOM: black 3pt solid; HEIGHT: 132pt; mso-shading: windowtext; mso-pattern: solid #E6E6E6" class="" vAlign=top width=468&gt;
&lt;P style="MARGIN: 6pt 0in 0pt 0.25in" class=AnnotationHead&gt;&lt;SPAN style="mso-font-width: 100%; mso-no-proof: yes"&gt;&lt;?xml:namespace prefix = v /&gt;&lt;v:shapetype id=_x0000_t75 coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;&lt;v:stroke joinstyle="miter"&gt;&lt;/v:stroke&gt;&lt;v:formulas&gt;&lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @0 1 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum 0 0 @1"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @2 1 2"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @3 21600 pixelWidth"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @3 21600 pixelHeight"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @0 0 1"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @6 1 2"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @7 21600 pixelWidth"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @8 21600 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @7 21600 pixelHeight"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @10 21600 0"&gt;&lt;/v:f&gt;&lt;/v:formulas&gt;&lt;v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"&gt;&lt;/v:path&gt;&lt;o:lock v:ext="edit" aspectratio="t"&gt;&lt;/o:lock&gt;&lt;/v:shapetype&gt;&lt;v:shape style="VISIBILITY: visible; WIDTH: 12.75pt; HEIGHT: 8.25pt; mso-wrap-style: square" id=Picture_x0020_25 o:spid="_x0000_i1025" type="#_x0000_t75"&gt;&lt;v:imagedata mce_src="file:///C:\Users\mirceat\AppData\Local\Temp\msohtmlclip1\01\clip_image001.wmz" mce_tsrc="file:///C:\Users\mirceat\AppData\Local\Temp\msohtmlclip1\01\clip_image001.wmz" o:title=""&gt;&lt;FONT face=Batang&gt;&lt;/FONT&gt;&lt;/v:imagedata&gt;&lt;/v:shape&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Mircea Trofin&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt; TEXT-INDENT: 0in; tab-stops: 0in decimal 15.0pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;Such a situation may occur when using a mix of third-party libraries. To resolve it, import in a file only one namespace defining extension methods on a type, and use fully-qualified static method calls for extension methods defined on the same type in a different namespace. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;Using the example before:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;&amp;lt;file 3&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;using A;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;T someObj=…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;someObj.ExtMethod(); &lt;B style="mso-bidi-font-weight: normal"&gt;//this calls A.ExtMethodsInA.ExtMethod&lt;/B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 9pt 0in 12pt; TEXT-INDENT: -0.25in" class=AnnotationBody&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;B.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B.&lt;/SPAN&gt;ExtMethodsInB.ExtMethod(someObj); &lt;B style="mso-bidi-font-weight: normal"&gt;//to avoid compilation errors of file 3, we call explicitly the extension method defined in namespace B&lt;/B&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P style="MARGIN: 2pt 0in 0pt; TEXT-INDENT: 0in" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;þ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Do&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt; define extension methods in the same namespace as the extended type, if the type is an interface, and if the extension methods are meant to be used in most or all cases. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN class=DO1&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: red; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;ý&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: red; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Do not&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt; define extension methods pertaining to a feature in namespaces normally associated with other features. Instead, define them in the namespace associated with the feature they belong to, or a namespace of it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;For example, do not define extension methods for &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Telecom.Node &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;in the &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Telecom &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;namespace, but in a separate namespace, e.g. &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Routing&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DO&gt;&lt;SPAN class=DO1&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: red; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;ý&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: red; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Avoid&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt; generic naming of namespaces dedicated to extension methods (e.g. “Extensions”) – rather, use a descriptive name – e.g. “&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Routing&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;”.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;þ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Do&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; use the new LINQ types “&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Func&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;” and “&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Expression&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;” instead of custom delegates and predicates, when defining new APIs. The example below illustrates this point&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Courier; mso-font-width: 100%; mso-bidi-font-family: Courier"&gt;//rather than:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Courier; mso-font-width: 100%; mso-bidi-font-family: Courier"&gt;delegate bool Tester(int i);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Courier; mso-font-width: 100%; mso-bidi-font-family: Courier"&gt;class AClass{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Courier; mso-font-width: 100%; mso-bidi-font-family: Courier"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp; &lt;/SPAN&gt;public Tester MyTester{get;set;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Courier; mso-font-width: 100%; mso-bidi-font-family: Courier"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Courier; mso-font-width: 100%; mso-bidi-font-family: Courier"&gt;//use this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Courier; mso-font-width: 100%; mso-bidi-font-family: Courier"&gt;class AClass{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Courier; mso-font-width: 100%; mso-bidi-font-family: Courier"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp; &lt;/SPAN&gt;public Func&amp;lt;int,bool&amp;gt; MyTester{get;set;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Courier; mso-font-width: 100%; mso-bidi-font-family: Courier"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;Benefits of using &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Func&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;, in this case, include minimizing the concept count by employing an existing abstraction, as well as eliminating the dependency on the definition of &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Tester&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H2 style="MARGIN: 24pt 0in 12pt 0.25in"&gt;&lt;FONT color=#4f81bd&gt;&lt;SPAN style="mso-fareast-font-family: Cambria; mso-fareast-theme-font: major-latin; mso-bidi-font-family: Cambria; mso-bidi-theme-font: major-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=4 face=Cambria&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=4 face=Cambria&gt;Extending on LINQ&lt;/FONT&gt;&lt;/FONT&gt;&lt;/H2&gt;
&lt;P style="MARGIN: 10pt 0in 0pt" class=BodyFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;There are three means by which a type can be designed to participate in LINQ queries: implementing &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IEnumerable&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt; (or interfaces derived from it), implementing &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IQueryable&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;, or by defining the Query Pattern on the type, with no relationship to these two interfaces. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 10pt 0in 0pt" class=BodyFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;To preface the guidelines, the choice can be made as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 10pt 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l4 level1 lfo5; mso-add-space: auto" class=BodyCxSpFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-fareast-font-family: Palatino"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Batang&gt;-&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt"&gt;&lt;FONT face=Batang&gt;Extend &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'"&gt;IEnumerable&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt"&gt;&lt;FONT face=Batang&gt; (or interfaced derived from it) if the default, LINQ to Objects support provided in the framework is sufficient&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in; mso-list: l4 level2 lfo5; mso-add-space: auto" class=BodyCxSpMiddle&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;o&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt"&gt;&lt;FONT face=Batang&gt;Override some/all LINQ methods if optimizations are required, but access to the query expression is not necessary&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l4 level1 lfo5; mso-add-space: auto" class=BodyCxSpMiddle&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-fareast-font-family: Palatino"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Batang&gt;-&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt"&gt;&lt;FONT face=Batang&gt;Extend &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'"&gt;IQueryable&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt"&gt;&lt;FONT face=Batang&gt; if access to the query expression is necessary&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 6pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l4 level1 lfo5; mso-add-space: auto" class=BodyCxSpLast&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-fareast-font-family: Palatino"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Batang&gt;-&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt"&gt;&lt;FONT face=Batang&gt;Define the Query Pattern on the new type if the domain makes it impossible or undesirable to implement &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'"&gt;IEnumerable&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt"&gt;&lt;FONT face=Batang&gt; or &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'"&gt;IQueryable&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 10pt 0in 0pt" class=BodyFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;The query methods are those defined by the sponsor class &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;System.Linq.Enumerable&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;, as extension methods to &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IEnumerable&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;. Regardless of the means by which a type participates in LINQ queries, the following guideline applies:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;þ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Do&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; respect the signature pattern in &lt;/SPAN&gt;&lt;FONT face=Batang&gt;Figure &lt;SPAN style="mso-no-proof: yes"&gt;1&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; when overriding LINQ methods.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;We use &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;S &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;with or without subscript to indicate a collection type (e.g. &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IEnumerable&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;, &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;ICollection&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;) and &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;T&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;, with or without subscript, to indicate the type of elements in that collection. Additionally, we use &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;O&amp;lt;T&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;to represent subtypes of &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;S&amp;lt;T&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; that are ordered. For example, &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;S&amp;lt;T&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; is a notation that could be substituted with &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IEnumerable&amp;lt;int&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;. The first parameter of all the methods is the type of the object the method is applied on, and it is marked accordingly by prefixing with “&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;this&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;” – whether one chooses to implement these methods as extension methods or as member methods. Also, anywhere &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Func&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; is being used, one may substitute accordingly with &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Expression&amp;lt;Func&amp;lt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; - the guidelines indicate where that is preferable.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;Please note that the notation is not meant to be valid code in any particular language, but simply present the type signature pattern.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;TABLE style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; MARGIN: auto auto auto 24pt; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-insideh: .5pt solid black; mso-border-insideh-themecolor: text1; mso-border-insidev: .5pt solid black; mso-border-insidev-themecolor: text1" class=MsoNormalTable border=1 cellSpacing=0 cellPadding=0 class="MsoNormalTable"&gt;
&lt;TBODY&gt;
&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;
&lt;TD style="BORDER-RIGHT: black 1pt solid; PADDING-RIGHT: 5.4pt; PADDING-LEFT: 5.4pt; BORDER-TOP: black 1pt solid; PADDING-BOTTOM: 0in; BORDER-LEFT: black 1pt solid; WIDTH: 361.8pt; PADDING-TOP: 0in; BORDER-BOTTOM: black 1pt solid; BACKGROUND-COLOR: transparent; mso-border-alt: solid black .5pt; mso-border-themecolor: text1" class="" vAlign=top width=482&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codelastCxSpFirst&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;S&amp;lt;T&amp;gt; Where(this S&amp;lt;T&amp;gt;, Func&amp;lt;T,bool&amp;gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codelastCxSpMiddle&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;S&amp;lt;T2&amp;gt; Select(this S&amp;lt;T1&amp;gt;,Func&amp;lt;T1,T2&amp;gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codelastCxSpMiddle mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codelastCxSpMiddle&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;O&amp;lt;T&amp;gt; OrderBy(this S&amp;lt;T&amp;gt;, Func&amp;lt;T,K&amp;gt;), where K is &amp;nbsp;IComparable&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codelastCxSpMiddle mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codelastCxSpMiddle&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;O&amp;lt;T&amp;gt; ThenBy(this O&amp;lt;T&amp;gt;,Func&amp;lt;T,K&amp;gt;), where K is &amp;nbsp;IComparable&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codelastCxSpMiddle&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;o:p&gt;&lt;FONT face=Courier&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codelastCxSpMiddle&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;S&amp;lt;T&amp;gt; Union(this S&amp;lt;T&amp;gt;, S&amp;lt;T&amp;gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codelastCxSpMiddle&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;o:p&gt;&lt;FONT face=Courier&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codelastCxSpMiddle&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;S&amp;lt;T&amp;gt; Skip(this S&amp;lt;T&amp;gt;,int)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codelastCxSpMiddle&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;S&amp;lt;T&amp;gt; Take(this S&amp;lt;T&amp;gt;,int)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codelastCxSpMiddle&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;S&amp;lt;T&amp;gt; SkipWhile(this S&amp;lt;T&amp;gt;, Func&amp;lt;T,bool&amp;gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codelastCxSpMiddle mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codelastCxSpMiddle&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;T ElementAt(this S&amp;lt;T&amp;gt;,int)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codelastCxSpMiddle mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codelastCxSpMiddle&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;S&amp;lt;T3&amp;gt; Join(this S&amp;lt;T1&amp;gt;, S&amp;lt;T2&amp;gt;,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codelastCxSpMiddle&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;&amp;nbsp;Func&amp;lt;T1,K1&amp;gt;,Func&amp;lt;T2,K2&amp;gt;,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codelastCxSpMiddle&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;&amp;nbsp;Func&amp;lt;T1,T2,T3&amp;gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codelastCxSpMiddle mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt 30.25pt" class=DO-codelastCxSpMiddle&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;S&amp;lt;T3&amp;gt; SelectMany(this &amp;nbsp;&amp;nbsp;&lt;SPAN style="WHITE-SPACE: pre" class=Apple-tab-span&gt;&lt;/SPAN&gt;S&amp;lt;T1&amp;gt;,Func&amp;lt;T1,S&amp;lt;T2&amp;gt;&amp;gt;,Func&amp;lt;T1,T2,T3&amp;gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 6pt 30.25pt; PAGE-BREAK-AFTER: avoid" class=DO-codelastCxSpLast mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 6pt 30.25pt; PAGE-BREAK-AFTER: avoid" class=DO-codelastCxSpLast&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;FONT face=Courier&gt;S&amp;lt;T2&amp;gt; SelectMany(this S&amp;lt;T1&amp;gt;,Func&amp;lt;T1,S&amp;lt;T2&amp;gt;&amp;gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoCaption&gt;&lt;A class="" title=_Ref185215760 name=_Ref185215760&gt;&lt;/A&gt;&lt;B&gt;&lt;FONT color=#4f81bd face="Times New Roman"&gt;Figure &lt;/FONT&gt;&lt;/B&gt;&lt;B&gt;&lt;FONT color=#4f81bd&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-bookmark: _Ref185215760"&gt;&lt;SPAN style="mso-no-proof: yes"&gt;1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-bookmark: _Ref185215760"&gt;&lt;/SPAN&gt; Query Pattern Method Signatures&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;H3 style="MARGIN: 10pt 0in 0pt"&gt;&lt;FONT color=#4f81bd size=3 face=Cambria&gt;Extending IEnumerable&amp;lt;&amp;gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;þ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Do&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; implement &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IEnumerable&amp;lt;T&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;to enable basic LINQ support. Such basic support should be sufficient for most in-memory data sets. The basic LINQ support will use the default -provided extension methods on &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;For example, simply defining:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;public class RangeOfInts:IEnumerable&amp;lt;int&amp;gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;public IEnumerator&amp;lt;int&amp;gt; GetEnumerator() {…}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;public IEnumerator GetEnumerator() {…}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;Allows for the following code:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;p&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;var a=new RangeOfInts();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;var b=a.Where(x=&amp;gt;x&amp;gt;10);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Courier; mso-font-width: 100%; mso-bidi-font-family: Courier"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;Although &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;RangeOfInts&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; did not implement a “&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Where&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;” method.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;þ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Consider&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; redefining the methods in the LINQ pattern on new types implementing &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;, if it is desirable to override the default implementation – e.g. for optimization. It is preferred that one redefines them as type members, rather than extension methods. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;For example, rather than: &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;public class MyDataSet&amp;lt;T&amp;gt;:IEnumerable&amp;lt;T&amp;gt;{…}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;public static class MyDataSetExtensions{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;public static MyDataSet&amp;lt;T&amp;gt; Where(this MyDataSet&amp;lt;T&amp;gt; o,Func&amp;lt;T,bool&amp;gt; f){…}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;Opt for this: &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;public class MyDataSet&amp;lt;T&amp;gt;:IEnumerable&amp;lt;T&amp;gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;public MyDataSet&amp;lt;T&amp;gt; Where(Func&amp;lt;T,bool&amp;gt; f){…}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;þ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Consider&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; implementing &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;ICollection&amp;lt;T&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; to improve performance of query operators. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;For example, the &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Count&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; method default behavior (as defined in &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;System.Linq&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;) is to simply walk the &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IEnumerable&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;. Collection types can optimize their implementation of this method, since they typically offer an &lt;I style="mso-bidi-font-style: normal"&gt;O(1)&lt;/I&gt; - complexity mechanism for finding the size of the collection.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H3 style="MARGIN: 10pt 0in 0pt"&gt;&lt;FONT color=#4f81bd size=3 face=Cambria&gt;Extending IQueryable&amp;lt;&amp;gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;þ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Consider&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; implementing &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IQueryable&amp;lt;T&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; when access to the query expression is necessary. For example, this applies for types representing potentially large data sets generated by remote processes, or for certain optimizations. An example of such a dataset is a database, the filesystem, or an in-memory dictionary that needs to be optimized for searching&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;for values (rather than keys). &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;The following guidelines detail this further: &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DO&gt;&lt;SPAN class=DO1&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: red; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;ý&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: red; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Do not&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt; implement &lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IQueryable&amp;lt;T&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt; without understanding all the performance tradeoffs. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo4" class=DO&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Symbol; mso-font-width: 100%; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;Building and parsing expression trees is expensive and many queries can actually get slower when &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IQueryable&amp;lt;T&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt; is implemented.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo4" class=DO&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Symbol; mso-font-width: 100%; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;The trade-off is acceptable in the LINQ to SQL case, since the alternative overhead of performing queries in memory would have been far greater than the transformation of the expression to an SQL statement and the delegation of the query processing to the database server&lt;/SPAN&gt;. &lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;þ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Do&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; throw &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;NotSupportedException&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; from &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IQueryable&amp;lt;T&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; methods that cannot be logically supported by your data source. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;For example, imagine representing a media stream (like internet radio) as an &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IQueryable&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;. The &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; method is not logically supported – the stream can be considered as infinite.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H3 style="MARGIN: 10pt 0in 0pt"&gt;&lt;FONT color=#4f81bd size=3 face=Cambria&gt;Implementing the Query Pattern&lt;/FONT&gt;&lt;/H3&gt;
&lt;P style="MARGIN: 10pt 0in 0pt" class=BodyFirst&gt;&lt;FONT face=Batang&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;The Query Pattern refers to defining the methods in &lt;/SPAN&gt;Figure &lt;SPAN style="mso-no-proof: yes"&gt;1&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt; without implemeting the &lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IEnumerable&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt; or &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IQueryable&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt; interfaces.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;þ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Do&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; implement at least the enumerable pattern (i.e. provide a &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;GetEnumerator&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; method) for types representing collections of data. This is because the expectation is that the result of the query methods be foreach-able. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;þ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Do&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; implement the Query Pattern as instance members on the new type, if the members make sense on the type even outside of the context of LINQ. Otherwise, use extension methods. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;þ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Do&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; represent ordered sequences as a separate type. Define on this type the “&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;ThenBy&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;” method. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;This follows the current pattern in the LINQ-to objects implementation, as well as allows for early (compile-time) detection of errors such as applying “&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;ThenBy&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;” to a not “&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;OrderBy&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;”-ed sequence. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;For &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;example, the framework provides the &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IOrderedEnumerable&amp;lt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;type, which is returned by “&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;OrderBy&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;”. The “&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;ThenBy&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;” extension method is defined for this type, and not for &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IEnumerable&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;þ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Consider&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; designing the LINQ operators to return specific enumerable types for domains that should be restricted. Essentially, one is free to return anything from a &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Select&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; query method, however, the expectation is that the query result type should be at least enumerable in a &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;foreach&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; loop - see the example below, as well as the next guideline: &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;var set1=…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;var set2=set1.Select(x=&amp;gt;x.SomeIntProperty);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;foreach(int i in set2){…}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;þ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Do&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; defer execution of query operator implementations. The expected behavior of most of the Query Pattern members is that they simply construct a new object which, upon enumeration, produces the elements of the set which match the query. The evaluation time is, then, at enumeration.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;The following methods are exception from this rule: &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;All, Any, Average, Contains, Count, ElementAt, Empty, First, FirstOrDefault, Last, LastOrDefault, Max, Min, Single, Sum.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;In the example above, the expectation is that the time necessary for evaluating the second line be be independent from the size or nature (e.g. in-memory or remote server) of &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;set1&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;. The general expectation is that this line simply prepares &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;set2&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;, delaying the determination of its composition to the time of its enumeration. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 10pt 0in 6pt" class=Body&gt;&lt;o:p&gt;&lt;FONT face=Batang&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DO&gt;&lt;SPAN style="mso-font-width: 100%"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT face=Batang&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: red; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;ý&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: red; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Avoid&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt; implementing just a part of the Query Pattern, if fallback to the basic &lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt; implementations is undesirable. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DO&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;For example, consider a user-defined type T, which implements &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IEnumerable&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;. T has an override for &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;, but not for &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Where&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;. Consider then the following example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Courier; mso-font-width: 100%; mso-bidi-font-family: Courier"&gt;var query=someT.Where(f2).Count();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt 24pt" class=NL&gt;&lt;o:p&gt;&lt;FONT face=Batang&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 2pt 0in 0pt; TEXT-INDENT: 0in" class=NL&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;In this example, any opportunities for optimization are lost after the &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Where &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;call. The &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Count &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;version used is the one defined for &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IEnumerable&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-font-width: 100%"&gt;&lt;FONT face=Batang&gt;.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;þ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Do&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; place query extensions methods in a “&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Linq&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;” sub-namespace of the main namespace. For example, extension methods for &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;System.Data&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; features reside in &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;System.Data.Linq&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; namespace.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; FONT-FAMILY: Wingdings; mso-bidi-font-family: MetaBlack-Roman; mso-ascii-font-family: MetaBlack-Roman; mso-hansi-font-family: MetaBlack-Roman; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;þ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;FONT face=Batang&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; mso-bidi-font-family: MetaBlack-Roman"&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN class=DO1&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 11pt; mso-bidi-font-family: MetaBlack-Roman"&gt;Do&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; use &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Expression&amp;lt;Func&amp;lt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; as a parameter instead of &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;Func&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; when it is necessary to inspect the query.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 12pt 0in 6pt 12.25pt" class=DOFirst&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;As it was discussed, interacting with an SQL database is already done through &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IQueryable&amp;lt;T&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt; rather than &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'; mso-font-width: 100%"&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Book Antiqua','serif'; mso-font-width: 100%; mso-bidi-font-family: 'Book Antiqua'"&gt;, since this gives an opportunity to translate lambda expressions to SQL expressions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;SPAN style="FONT-SIZE: 11pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Book Antiqua','serif'; mso-bidi-font-family: 'Book Antiqua'"&gt;An alternative reason for implementing &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;IQueryable&amp;lt;T&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Book Antiqua','serif'; mso-bidi-font-family: 'Book Antiqua'"&gt; is performing optimizations. For example, a sorted list can implement lookup (“&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;Where&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Book Antiqua','serif'; mso-bidi-font-family: 'Book Antiqua'"&gt;” clauses) with binary search, which can be much more efficient than the standard &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Book Antiqua','serif'; mso-bidi-font-family: 'Book Antiqua'"&gt; or &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;IQueryable&amp;lt;T&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Book Antiqua','serif'; mso-bidi-font-family: 'Book Antiqua'"&gt; implementations.&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8177610" width="1" height="1"&gt;</description></item><item><title>Semi-structured data</title><link>http://blogs.msdn.com/mirceat/archive/2007/09/25/semi-structured-data.aspx</link><pubDate>Wed, 26 Sep 2007 01:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5130306</guid><dc:creator>mirceat</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mirceat/comments/5130306.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mirceat/commentrss.aspx?PostID=5130306</wfw:commentRss><description>&lt;P&gt;I think that, from the perspective of a component (== "chunk" of code meant for reuse) writer, the world outside their component is &lt;A class="" href="http://www.dcs.bbk.ac.uk/~ptw/teaching/ssd/toc.html" mce_href="http://www.dcs.bbk.ac.uk/~ptw/teaching/ssd/toc.html"&gt;semi-structured data&lt;/A&gt;: the component writer may assume some sort of structure, but they cannot assume that structure exclusively.&lt;/P&gt;
&lt;P mce_keep="true"&gt;On a parallel note, suppose one writes code that finds the first common manager of two employees in Active Directory. Would anything &lt;EM&gt;&lt;STRONG&gt;essential&lt;/STRONG&gt;&lt;/EM&gt; change if the organizational structure were kept in an XML file? In fact, is the &lt;STRONG&gt;&lt;EM&gt;core&lt;/EM&gt;&lt;/STRONG&gt; of this solution any different from that for finding the first common parent folder of two files? Or first common parent of two classes in a single-inheritance object-oriented type system?&lt;/P&gt;
&lt;P mce_keep="true"&gt;Active Directories, XML files, file systems,&amp;nbsp;a graph of classes and their inheritance relationships are, to my understanding, examples of semi-structured data.&lt;/P&gt;
&lt;P mce_keep="true"&gt;If our developer were able to &lt;STRONG&gt;&lt;EM&gt;cheaply&lt;/EM&gt;&lt;/STRONG&gt; (==effortlessly) use an abstraction over such data, would &lt;STRONG&gt;reuse&lt;/STRONG&gt; be enhanced?&lt;/P&gt;
&lt;P mce_keep="true"&gt;I'm currently reminding myself of &lt;A class="" href="http://research.sun.com/self/papers/papers.html" mce_href="http://research.sun.com/self/papers/papers.html"&gt;Self&lt;/A&gt;&amp;nbsp;and naming services in open systems. I believe there is a connection between the concepts (...and I bet others do, too). Now, if there were a "by default" available entry point into a semi-structured world - say, a Self-like object - how would a component writer describe their assumptions over that world? Like, say, in our example, the presence of a unique navigation path to "parent"/"container" objects?&lt;/P&gt;
&lt;P mce_keep="true"&gt;Would something like XPath/XQuery help - or, programmatically, LINQ?&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5130306" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mirceat/archive/tags/Framework+Design+Guidelines/default.aspx">Framework Design Guidelines</category><category domain="http://blogs.msdn.com/mirceat/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://blogs.msdn.com/mirceat/archive/tags/.NET/default.aspx">.NET</category></item><item><title>Languages...</title><link>http://blogs.msdn.com/mirceat/archive/2007/09/25/languages.aspx</link><pubDate>Tue, 25 Sep 2007 09:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5113590</guid><dc:creator>mirceat</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/mirceat/comments/5113590.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mirceat/commentrss.aspx?PostID=5113590</wfw:commentRss><description>&lt;P style=""&gt;I was talking to colleagues about functional languages, in particular Haskell and Lisp, and I promissed some links and whatnot... I meant to start a blog anyway, I thought, what a good way to start it!&lt;/P&gt;&lt;P style=""&gt; So here we are, I'll have at least this page with links that I found interesting in the area of languages - especially functional ones.&lt;/P&gt;&lt;P mce_keep="true"&gt; &lt;/P&gt;&lt;P style=""&gt;&lt;SPAN class="Apple-style-span" style="font-weight: bold;"&gt;On Haskell:&lt;/SPAN&gt;&lt;/P&gt;&lt;P mce_keep="true"&gt;The WikiBooks &lt;A class="" mce_href="http://en.wikibooks.org/wiki/Haskell" href="http://en.wikibooks.org/wiki/Haskell"&gt;entry&lt;/A&gt; is interesting. I also found an interesting blog article on &lt;A class="" mce_href="http://sigfpe.blogspot.com/2006/08/you-could-have-invented-monads-and.html" href="http://sigfpe.blogspot.com/2006/08/you-could-have-invented-monads-and.html"&gt;monads&lt;/A&gt;.&lt;/P&gt;&lt;P mce_keep="true"&gt;On a more academic side, I found Wadler's "&lt;A class="" mce_href="http://citeseer.ist.psu.edu/cache/papers/cs/471/http:zSzzSzcm.bell-labs.comzSzcmzSzcszSzwhozSzwadlerzSzpaperszSzmarktoberdorfzSzmarktoberdorf.pdf/wadler95monads.pdf" href="http://citeseer.ist.psu.edu/cache/papers/cs/471/http:zSzzSzcm.bell-labs.comzSzcmzSzcszSzwhozSzwadlerzSzpaperszSzmarktoberdorfzSzmarktoberdorf.pdf/wadler95monads.pdf"&gt;Monads for Functional Programming&lt;/A&gt;" particularly enlightning.&lt;/P&gt;&lt;P mce_keep="true"&gt;...of course, one can just get a wealth of info on &lt;A href="http://haskell.org/"&gt;http://haskell.org&lt;/A&gt;. I particularly happened to use this &lt;A class="" mce_href="http://www.cs.caltech.edu/courses/cs11/material/haskell/index.html" href="http://www.cs.caltech.edu/courses/cs11/material/haskell/index.html"&gt;course&lt;/A&gt; for practice.&lt;/P&gt;&lt;P mce_keep="true"&gt;&lt;SPAN class="Apple-style-span" style="font-weight: bold;"&gt;On Lisp:&lt;/SPAN&gt;&lt;/P&gt;&lt;P mce_keep="true"&gt;&lt;A class="" mce_href="http://www.gigamonkeys.com/book/" href="http://www.gigamonkeys.com/book/"&gt;Practical Common Lisp&lt;/A&gt;. A good read these days. Also, Paul Graham's &lt;A class="" mce_href="http://www.paulgraham.com/onlisptext.html" href="http://www.paulgraham.com/onlisptext.html"&gt;On Lisp&lt;/A&gt; is a good read.&lt;/P&gt;&lt;P mce_keep="true"&gt;&lt;BR class="khtml-block-placeholder"&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5113590" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mirceat/archive/tags/lisp/default.aspx">lisp</category><category domain="http://blogs.msdn.com/mirceat/archive/tags/functional+programming/default.aspx">functional programming</category><category domain="http://blogs.msdn.com/mirceat/archive/tags/haskell/default.aspx">haskell</category></item></channel></rss>