<?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>Extension methods in C#</title><link>http://blogs.msdn.com/sreekarc/archive/2007/04/25/extension-methods.aspx</link><description>Overview Extension methods are a new feature for C# 3.0 and I had the opportunity to implement them in the Compiler. These methods can then be called with instance syntax on any object that is convertible(see convertibility section for details) to the</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Extension methods in C#</title><link>http://blogs.msdn.com/sreekarc/archive/2007/04/25/extension-methods.aspx#2285296</link><pubDate>Thu, 26 Apr 2007 14:09:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2285296</guid><dc:creator>Wilka</dc:creator><description>&lt;p&gt;When you say &amp;quot;6. The Type parameter used must be defined on the method and not the parentclass.&amp;quot; what do you mean by &amp;quot;Type parameter&amp;quot;? I'm not sure which parameter this refers to, is it the type of the instance parameter? or some other parameter?&lt;/p&gt;
</description></item><item><title>re: Extension methods in C#</title><link>http://blogs.msdn.com/sreekarc/archive/2007/04/25/extension-methods.aspx#2287834</link><pubDate>Thu, 26 Apr 2007 19:15:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2287834</guid><dc:creator>Dave</dc:creator><description>&lt;p&gt;That method is generic so it has a type parameter list (the names between &amp;lt; and &amp;gt; are the type parameters). So when he says &amp;quot;the Type parameter&amp;quot; he is referring to the T.&lt;/p&gt;
&lt;p&gt;You can also make generic classes, that's when the class itself has a type parameter list. Number six is saying that with extension methods you can't use any type parameters from the containing class only type params from the (generic) extension method.&lt;/p&gt;
</description></item><item><title>re: Extension methods in C#</title><link>http://blogs.msdn.com/sreekarc/archive/2007/04/25/extension-methods.aspx#2288325</link><pubDate>Thu, 26 Apr 2007 20:11:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2288325</guid><dc:creator>Rob P</dc:creator><description>&lt;p&gt;There's no way to add static methods or new operators using Extension Methods is there?&lt;/p&gt;
</description></item><item><title>re: Extension methods in C#</title><link>http://blogs.msdn.com/sreekarc/archive/2007/04/25/extension-methods.aspx#2291917</link><pubDate>Fri, 27 Apr 2007 02:49:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2291917</guid><dc:creator>Sree_c</dc:creator><description>&lt;p&gt;All Extension methods are static methods and can be called as such.&lt;/p&gt;
&lt;p&gt;No extension methods can't be operator they are always bound as methods. Object.ExtensionName(arguments .... )&lt;/p&gt;
</description></item><item><title>re: Extension methods in C#</title><link>http://blogs.msdn.com/sreekarc/archive/2007/04/25/extension-methods.aspx#2301213</link><pubDate>Fri, 27 Apr 2007 20:16:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2301213</guid><dc:creator>Rob P</dc:creator><description>&lt;p&gt;Sure the extension methods themselves are static methods, but they appear as instance methods on the type being extended.&lt;/p&gt;
&lt;p&gt;Is there a technical reason why you couldn't extend types with new static methods (and operators) or was this just a design decision to support the minimal amount necessary to make LINQ work nicely?&lt;/p&gt;
</description></item><item><title>re: Extension methods in C#</title><link>http://blogs.msdn.com/sreekarc/archive/2007/04/25/extension-methods.aspx#2335380</link><pubDate>Mon, 30 Apr 2007 09:04:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2335380</guid><dc:creator>Sree_c</dc:creator><description>&lt;p&gt;Extension methods were added so that we can call the methods with instance syntax. This is usefull to write code that reads more like the intent of the programmer. Making the code more comprehensible and easy to change and maintain.&lt;/p&gt;
&lt;p&gt;So we can write &lt;/p&gt;
&lt;p&gt;order.Search((o) =&amp;gt; o.Name = custName).SendTobilling();&lt;/p&gt;
&lt;p&gt;It is important note that this is just a change in the binding rules for instance methods and is suported by intellisence and debugging which use the compilers binding code.&lt;/p&gt;
&lt;p&gt;Similar changes to binding rules for operators would be a breaking change for exiting code, &amp;nbsp;and would make the client code confusing since &amp;nbsp;a + b would work where the extensions were imported and not every where else. Also relational operators can only be overloaded in pairs ( OOo my head is hurting with the possible validation checks for this one and we are only getting started). Combine this with the fact that completion lists would be of no help to you, all in all this is solvable but very problematic. &lt;/p&gt;
&lt;p&gt;Static methods ... well since extension methods are static to begin with does it matter which type you are calling the method on (Extesnsion type of your type).&lt;/p&gt;
</description></item><item><title>Extension Methods in C#</title><link>http://blogs.msdn.com/sreekarc/archive/2007/04/25/extension-methods.aspx#2485812</link><pubDate>Tue, 08 May 2007 23:23:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2485812</guid><dc:creator>DotNetKicks.com</dc:creator><description>&lt;p&gt;You've been kicked (a good thing) - Trackback from DotNetKicks.com&lt;/p&gt;
</description></item><item><title>re: Extension methods in C#</title><link>http://blogs.msdn.com/sreekarc/archive/2007/04/25/extension-methods.aspx#2551602</link><pubDate>Fri, 11 May 2007 22:24:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2551602</guid><dc:creator>Matthieu MEZIL</dc:creator><description>&lt;p&gt;I open a codeplex project for an Extension Methods library : &lt;a rel="nofollow" target="_new" href="http://www.codeplex.com/ExtensionMethods"&gt;http://www.codeplex.com/ExtensionMethods&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Community Convergence XXVII</title><link>http://blogs.msdn.com/sreekarc/archive/2007/04/25/extension-methods.aspx#2618211</link><pubDate>Mon, 14 May 2007 09:19:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2618211</guid><dc:creator>Charlie Calvert's Community Blog</dc:creator><description>&lt;p&gt;Welcome to the 27th Community Convergence. I use this column to keep you informed of events in the C#&lt;/p&gt;
</description></item><item><title>re: Extension methods in C#</title><link>http://blogs.msdn.com/sreekarc/archive/2007/04/25/extension-methods.aspx#3196147</link><pubDate>Sun, 10 Jun 2007 06:46:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3196147</guid><dc:creator>Arshvinder Singh</dc:creator><description>&lt;p&gt;Plz expalin me from where this thing came from&lt;/p&gt;
&lt;p&gt;We can write client code like &lt;/p&gt;
&lt;p&gt;del1&amp;lt;int&amp;gt; d1 = t.func&amp;lt;int&amp;gt;;&lt;/p&gt;
</description></item><item><title>re: Extension methods in C#</title><link>http://blogs.msdn.com/sreekarc/archive/2007/04/25/extension-methods.aspx#3449415</link><pubDate>Fri, 22 Jun 2007 01:51:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3449415</guid><dc:creator>Sree_c</dc:creator><description>&lt;p&gt;Sorry for the incomplete example ... basically we are creating an delegate and calling the extension method Exec on it. The important information missing is the defintion of the method func that created the delegate.&lt;/p&gt;
&lt;p&gt; &amp;nbsp;public class Test&lt;/p&gt;
&lt;p&gt; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; public static void Main()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Test t = new Test();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; del1&amp;lt;int&amp;gt; d1 = t.func&amp;lt;int&amp;gt;;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(d1.Exec(100));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; public int func()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return 10;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; public T func&amp;lt;T&amp;gt;(T val)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return val;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
</description></item><item><title>How we use Entension Methods with InCisif.net</title><link>http://blogs.msdn.com/sreekarc/archive/2007/04/25/extension-methods.aspx#4725215</link><pubDate>Mon, 03 Sep 2007 18:18:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4725215</guid><dc:creator>ftorres</dc:creator><description>&lt;p&gt;We started using some of the new C# 3.0&lt;/p&gt;
&lt;p&gt;features with our functional web testing tool InCisif.net, including extensions methods and lambda expression.&lt;/p&gt;
&lt;p&gt;Our goal is to be able to simplify the test code.&lt;/p&gt;
&lt;p&gt;And it is great.&lt;/p&gt;
&lt;p&gt;see our posts :&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blog.incisif.net/2007/09/02/incisifnet-20-and-c-30-lambda-expression.aspx"&gt;http://blog.incisif.net/2007/09/02/incisifnet-20-and-c-30-lambda-expression.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blog.incisif.net/2007/05/28/orcas-net-35-and-c-30.aspx"&gt;http://blog.incisif.net/2007/05/28/orcas-net-35-and-c-30.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Feedback welcome.&lt;/p&gt;
</description></item><item><title>re: Extension methods in C#</title><link>http://blogs.msdn.com/sreekarc/archive/2007/04/25/extension-methods.aspx#4952146</link><pubDate>Mon, 17 Sep 2007 11:01:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4952146</guid><dc:creator>Matthieu MEZIL</dc:creator><description>&lt;p&gt;I did a french webcast about extension methods:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="ftp://ftp-developpez.com/matthieumezil/webcasts/ExtensionMethods.wmv"&gt;ftp://ftp-developpez.com/matthieumezil/webcasts/ExtensionMethods.wmv&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: 拡張メソッドなら、this == null でもいい。</title><link>http://blogs.msdn.com/sreekarc/archive/2007/04/25/extension-methods.aspx#7141183</link><pubDate>Thu, 17 Jan 2008 14:33:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7141183</guid><dc:creator>Out of Memory</dc:creator><description>&lt;p&gt;re: 拡張メソッドなら、this == null でもいい。&lt;/p&gt;
</description></item><item><title>re: Extension methods in C#</title><link>http://blogs.msdn.com/sreekarc/archive/2007/04/25/extension-methods.aspx#8166229</link><pubDate>Wed, 12 Mar 2008 08:50:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8166229</guid><dc:creator>avantika srivastava</dc:creator><description>&lt;p&gt;hi&lt;/p&gt;
&lt;p&gt;can you plaese explain me, how can we add images using the extension methods.........&lt;/p&gt;
</description></item><item><title>re: Extension methods in C#</title><link>http://blogs.msdn.com/sreekarc/archive/2007/04/25/extension-methods.aspx#8181624</link><pubDate>Thu, 13 Mar 2008 19:17:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8181624</guid><dc:creator>Sree_c</dc:creator><description>&lt;p&gt;avantika, i am not sure i understand. Extension methods add a usefull call symatics, its up the user to implement whatever they want in the method body. &lt;/p&gt;
</description></item><item><title>re: Extension methods in C#</title><link>http://blogs.msdn.com/sreekarc/archive/2007/04/25/extension-methods.aspx#8620951</link><pubDate>Thu, 19 Jun 2008 12:02:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8620951</guid><dc:creator>JDP</dc:creator><description>&lt;p&gt;Thanks for the thorough description. Just what I was looking for.&lt;/p&gt;
</description></item><item><title>re: Extension methods in C# for operators?</title><link>http://blogs.msdn.com/sreekarc/archive/2007/04/25/extension-methods.aspx#9150318</link><pubDate>Fri, 28 Nov 2008 10:47:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9150318</guid><dc:creator>Marty</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;today I have tried to add some methods mathematical notation to my classes to work on voxel volume data. I wanted to implement an operator * which works on the volume. &lt;/p&gt;
&lt;p&gt;Is it possible to use extension methods to add some operator functions?&lt;/p&gt;
</description></item></channel></rss>