Converted .net project from 2.0 to 3.5, where are the extension methods?

I recently converted my application from .net 2.0 to 3.5, but I don't see any extension methods ... what am I doing wrong? Or what else should I do besides changing the target structure from 2.0 to 3.5 in the project settings?

0


a source to share


3 answers


Extension methods are rendered based on imported namespaces by adding

using System.Linq;

      



at the beginning of your files. As John says, you will also need to add a reference to the System.Core.dll assembly.

+2


a source


You don't need to add a use directive for System.Linq

as suggested by SillyMonkey, but you also need to have an assembly reference System.Core

if you want to use LINQ.



+1


a source


The extension method is a function of .net 3.5. extension methods are what you need to create !!!

What are extension methods?

link to this link

0


a source







All Articles