I've recently converted an app 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 framework from 2.0 to 3.5 in project settings?
Asked
Active
Viewed 275 times
3 Answers
2
Extension methods appear based on the imported namespaces try adding
using System.Linq;
to the top of your files. As Jon says you'll also need add a reference to System.Core.dll assembly.
SillyMonkey
- 1,304
- 3
- 11
- 14
1
You not only need to add the using directive for System.Linq
as SillyMonkey suggested, but you also need to have a reference to the System.Core
assembly if you want to use LINQ.
Jon Skeet
- 1,261,211
- 792
- 8,724
- 8,929
-
@argh - I think it is. But it makes for a more complete answer (eg. the reference may get left out depending on how the project is upgraded) – SillyMonkey May 20 '09 at 15:37
0
Extension method, is feature of .net 3.5. extension methods are some thing that you need to create !!!
refer this link
Community
- 1
- 1
Prashant Cholachagudda
- 12,542
- 20
- 93
- 161
-
-
dude, I don't know if you know... but there are extension methods ALREADY written in 3.5 – argh May 20 '09 at 10:17
-