<?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>Framework Design Guidelines: Extension Methods</title><link>http://blogs.msdn.com/brada/archive/2009/01/12/framework-design-guidelines-extension-methods.aspx</link><description>Continuing in our weekly blog post series that highlights a few of the new additions to the Framework Design Guidelines 2 nd edition .. This content is found in the Extension Methods section of Chapter 5: Member Design. One of the major new features we</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Framework Design Guidelines: Extension Methods</title><link>http://blogs.msdn.com/brada/archive/2009/01/12/framework-design-guidelines-extension-methods.aspx#9314108</link><pubDate>Tue, 13 Jan 2009 13:10:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9314108</guid><dc:creator>Rune Juhl-Petersen</dc:creator><description>&lt;p&gt;Extension methods are just great, making code more readable and understandable.&lt;/p&gt;
&lt;p&gt;I'm missing static extension methods (define a static method on a class or interface). Are there any plans to include that at some point?&lt;/p&gt;
</description></item><item><title>re: Framework Design Guidelines: Extension Methods</title><link>http://blogs.msdn.com/brada/archive/2009/01/12/framework-design-guidelines-extension-methods.aspx#9315346</link><pubDate>Tue, 13 Jan 2009 17:53:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9315346</guid><dc:creator>Andrei Rinea</dc:creator><description>&lt;p&gt;Along with static extension methods a nice addition would be extension properties.. In fact they're still methods behind the scene, right?&lt;/p&gt;
</description></item><item><title>re: Framework Design Guidelines: Extension Methods</title><link>http://blogs.msdn.com/brada/archive/2009/01/12/framework-design-guidelines-extension-methods.aspx#9316009</link><pubDate>Tue, 13 Jan 2009 20:02:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9316009</guid><dc:creator>David Nelson</dc:creator><description>&lt;p&gt;Hopefully, the actual entry in the book spells out the disadvantages of extension methods more strongly:&lt;/p&gt;
&lt;p&gt;- They are not discoverable. You can't just look at intellisense or the class documentation to discover its capabilities. You have to have foreknowledge that the functionality you want exists and what namespace to find it in.&lt;/p&gt;
&lt;p&gt;- The are fragile. Extension methods introduce a new version of the Fragile Base Class problem, where an instance method introduced in a later version of a class will silently and transparently replace the extension method. For some reason, no steps were taken to mitigate this problem in the design of extension methods.&lt;/p&gt;
</description></item><item><title>Extension methods and Interfaces.</title><link>http://blogs.msdn.com/brada/archive/2009/01/12/framework-design-guidelines-extension-methods.aspx#9320076</link><pubDate>Thu, 15 Jan 2009 07:59:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9320076</guid><dc:creator>@ Head</dc:creator><description>&lt;p&gt;A comment by Joe Duffy on the Framework Guidelines for Extension says : Extension methods can also be&lt;/p&gt;
</description></item><item><title>Extension methods and Interfaces.</title><link>http://blogs.msdn.com/brada/archive/2009/01/12/framework-design-guidelines-extension-methods.aspx#9320138</link><pubDate>Thu, 15 Jan 2009 09:00:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9320138</guid><dc:creator>VB Feeds</dc:creator><description>&lt;p&gt;A comment by Joe Duffy on the Framework Guidelines for Extension says : Extension methods can also be&lt;/p&gt;
</description></item><item><title>re: Framework Design Guidelines: Extension Methods</title><link>http://blogs.msdn.com/brada/archive/2009/01/12/framework-design-guidelines-extension-methods.aspx#9326946</link><pubDate>Fri, 16 Jan 2009 14:01:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9326946</guid><dc:creator>Dave</dc:creator><description>&lt;p&gt;Personally I find that extension methods clobber the code. People who are unfamiliar with the extensions used might be confused that SqlCommand suddenly had an SetErrorCallback. &lt;/p&gt;
&lt;p&gt;cmd.SetErrorCallback( (e) =&amp;gt; Console.WriteLine(e.Message));&lt;/p&gt;
&lt;p&gt;Might seem out of place in stead of&lt;/p&gt;
&lt;p&gt;SqlCommandUtil.SetErrorCallback(cmd, (e) =&amp;gt; Console.WriteLine(e.Message)) &lt;/p&gt;
&lt;p&gt;in your code &amp;nbsp;what would be used by the compiler eventually.&lt;/p&gt;
&lt;p&gt;I haven't found one usefull usage of extention methods.&lt;/p&gt;
</description></item><item><title>Extension Method Guidelines</title><link>http://blogs.msdn.com/brada/archive/2009/01/12/framework-design-guidelines-extension-methods.aspx#9346849</link><pubDate>Tue, 20 Jan 2009 16:23:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9346849</guid><dc:creator>Patrick Steele's .NET Blog</dc:creator><description>&lt;p&gt;I'm spending some time this morning getting caught up on RSS reading.&amp;amp;#160; A great post from last week&lt;/p&gt;
</description></item><item><title>Extension Method Guidelines</title><link>http://blogs.msdn.com/brada/archive/2009/01/12/framework-design-guidelines-extension-methods.aspx#9348789</link><pubDate>Tue, 20 Jan 2009 19:47:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9348789</guid><dc:creator>Patrick Steele</dc:creator><description>&lt;p&gt;I&amp;amp;#39;m spending some time this morning getting caught up on RSS reading.&amp;amp;#160; A great post from last&lt;/p&gt;
</description></item><item><title>re: Framework Design Guidelines: Extension Methods</title><link>http://blogs.msdn.com/brada/archive/2009/01/12/framework-design-guidelines-extension-methods.aspx#9350045</link><pubDate>Tue, 20 Jan 2009 22:12:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9350045</guid><dc:creator>Christopher Harris</dc:creator><description>&lt;p&gt;I agree with Andrei! &amp;nbsp;Extension properties might be awesome, the other day I was really wishing I could make a TimeSpan.OneDay extension property.&lt;/p&gt;
&lt;p&gt;Also, I &amp;nbsp;actually favor keeping my extensions somewhat hidden. &amp;nbsp;The extensions I use on one project aren't necessarily always applicable in another.&lt;/p&gt;
</description></item><item><title>re: Framework Design Guidelines: Extension Methods</title><link>http://blogs.msdn.com/brada/archive/2009/01/12/framework-design-guidelines-extension-methods.aspx#9361913</link><pubDate>Thu, 22 Jan 2009 06:09:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9361913</guid><dc:creator>Kevin Westhead</dc:creator><description>&lt;p&gt;As David points out, there are disadvantages to extension methods but the full text does cover them. However I'm not convinced about the concerns with discoverability. Extension methods are typically used in scenarios where static methods on helper classes would have been used before. With extension methods you need to know the namespace but with static helpers you need to know the class name. This might not be obvious if you're dealing with more derived types. Both approaches have problems but I've frequently found that extension methods naturally end up in a commonly imported namespace, which means IntelliSense is usually available for all compatible types. Nonetheless, as others have already said and as the full FDG text states, extension methods shouldn't be used frivolously.&lt;/p&gt;
</description></item></channel></rss>