Solved

How do I get Extension methods to show on my IList object?

Posted on 2011-09-21
2
451 Views
Last Modified: 2013-11-07
I have this declaration:
public IList<IMyType> MyTypeList { get; set; }

But .Select is not available.

I see other code in the project I am working on that accesses this extension method.  I have looked through the "includes" but don't see a difference between the files that access .Select and my class file.

What do I need to include to make .Select available to my IList?
0
Comment
Question by:Bruce
2 Comments
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
Comment Utility
The namespace for the Select method has to be defined with a using statement at the top of the files where you want to use the extension.
0
 
LVL 1

Author Closing Comment

by:Bruce
Comment Utility
Needed to add System.Linq
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now