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

  • SEARCH
  • Home
  • 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 8291031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:59:31+00:00 2026-06-08T12:59:31+00:00

I am using Microsoft Visual Studio 2005 with .NET 2.0. I have a comboBox

  • 0

I am using Microsoft Visual Studio 2005 with .NET 2.0. I have a comboBox that I use to select a product. After I select a product I am searching for it in a text file – in the end I want to find the line of that product in the file. However with the following code

int lineNo = lineList.IndexOf(lineList.Find(x => x.StartsWith(select)));

the compiler gives the error :

Invalid expression term '>' 

Is this a problem with the 2.0 framework version of .NET?

  • 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-06-08T12:59:32+00:00Added an answer on June 8, 2026 at 12:59 pm

    I have using Microsoft Visual Studio 2005 with 2.0 Net.

    That means you’re using C# 2.

    But you’re trying to use a lambda expression (=>) – a feature introduced in C# 3. It’s not the version of the framework that you’re using – you could write the same code in VS2008 or later, still targeting .NET 2. It’s the version of the language you’re using.

    You can do something similar in C# 2 with an anonymous method though:

    int lineNo = lineList.IndexOf(lineList.Find(delegate(String x)
    { 
       return x.StartsWith(select);
    }));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Visual Studio 2005 w/.NET 2.0. I have no idea what happened, but
We have a native C++ Win32 .exe built using Visual Studio 2005 that works
Using: Microsoft SQL Server 2008 Microsoft Visual Studio 2010 C# .NET 4.0 WinForms Ok
I am using the Microsoft ARM Assembler v15.00.20720 (armasm.exe) that came with Visual Studio
I wrote a C++ project called 'Foo' using Microsoft Visual Studio 2005 Verison 8.0.50727.762
I am using boost::interprocess::message_queue, with VC++ (in Microsoft Visual Studio 2005). It is working
I have a WinForms app built using Visual Studio 2005, including the crystal reports
I am using Visual Studio 2005, .NET Framework 2.0. Now I started using Visual
It seems that cmath for visual studio 2005 does not have erf(x). I am
Using Visual Studio 2005, the debugger tells me that a deadlock has occurred just

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.