Differences between extension methods in C#3 & 4

Posted by Buh Buh on Stack Overflow See other posts from Stack Overflow or by Buh Buh
Published on 2011-01-04T11:47:31Z Indexed on 2011/01/04 11:53 UTC
Read the original article Hit count: 154

Filed under:
|
|

I think I remember reading a long time ago that in C#3 extension methods could only be applied to primitive types and interfaces; and that in C#4 they could be used to extend any type. This doesn't seam to match up with what I am seeing now and I am finding it difficult to find this documented.

Is there any truth to this or did my memory make it all up?

What are the rules relating to which types can be extended?

Are there any differences between C# 3 and 4?

© Stack Overflow or respective owner

Related posts about c#

Related posts about extension-methods