Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7089083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:52:45+00:00 2026-05-28T07:52:45+00:00

I ask the question because whenever I attempt to call an extension method from

  • 0

I ask the question because whenever I attempt to call an extension method from the Immediate window in Visual Studio 2010 I get the following error:

System.Collections.Generic.IEnumerable’ does not contain a definition for ‘ToList’ and no extension method ‘ToList’ accepting a first argument of type ‘System.Collections.Generic.IEnumerable’ could be found (are you missing a using directive or an assembly reference?)

If the Immediate window doesn’t support extension methods, then why is it that when I type my variable (of type IEnumerable<QueryFilter>) followed by a dot, the IntelliSense lists all the extension methods?

There is nothing wrong with what I am typing in the Command window because if I copy and paste it into my code file and run, it works.

With Visual Studio 2012 doing the same thing for the same solution works fine. If I switch back to VS2010 and the problem persists.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:52:46+00:00Added an answer on May 28, 2026 at 7:52 am

    This behaviour is caused by Code Contracts, and is not limited to just the Immediate window but also the Conditional Breakpoints window too.

    Update March 01, 2016:
    Found this MSDN Question asking why type resolution is not working in my watch windows. The behaviour described is exactly the same as I experience when using the Immediate Window. The cause is also attributed to CodeContracts and a bug report has been filed on Microsoft Connect. Whether or not the bug is resolve is not indicated.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I ask this question because I'm not able to test it at the moment.
Just like Carl's question over here I would like to ask you (because I
This question is mostly academic. I ask out of curiosity, not because this poses
I saw someone ask a question about detecting if a URL redirects from groovy
I ask this question because i learned that in programming and designing, you must
I ask this question because I find the the community contributions to the various
I almost didn't dare to ask this question because it looks trivial but after
I ask this question because I've implemented a javascript solution to nested inlines (it
I am hesitated to ask this question because it looks weird. But anyway. Just
I'm hesitant to ask this question because of the vagueness of the situation, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.