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 5979193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:37:29+00:00 2026-05-22T21:37:29+00:00

is it ok if i have this X project using .net2.0, and that X

  • 0

is it ok if i have this X project using .net2.0, and that X project is calling Y project which is using .net3.5.. i got customized buttons in Y project and im using that button in X project also, there’s a method in Y project that has LINQ and X project is calling that method… i cant test it because i installed the latest .net framework.. 🙂

this is my code in project that has the .net3.5

    [DllImport("kernel32.dll", CharSet = CharSet.Auto)]
    public static extern int GetDriveType(string lpRootPathName);        

    public enum DriveType : int
    {
        Unknown = 0,
        NoRoot = 1,
        Removable = 2,
        Localdisk = 3,
        Network = 4,
        CD = 5,
        RAMDrive = 6
    }
    var selectedDrives = from s in Environment.GetLogicalDrives() where Enum.GetName(typeof(DriveType), GetDriveType(s)).Equals(DriveType.Removable) select s;
        foreach (String drives in selectedDrives)
        {
            MessageBox.Show(drives);

        }

correct also the LINQ statement if i did it wrong.. 🙂

  • 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-22T21:37:31+00:00Added an answer on May 22, 2026 at 9:37 pm

    If the 3.5 framework is not installed on the machine that executes this, it will fail as System.Linq.dll won’t exist. You can use LINQBridge with .NET 2.0 and C# 3.0 (which will give you access to a re-implementation of LINQ-to-Objects) but in reality it may be easier to get the client to upgrade. 2.0 is pretty old now.

    Alternatively… if all you need is a where, there are easier routes. For example:

    foreach (String drives in Environment.GetLogicalDrives())
    {
        if(!Enum.GetName(typeof(DriveType), GetDriveType(s))
            .Equals(DriveType.Removable))
        {
            continue;
        }
        MessageBox.Show(drives);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using .net 2.0. This is a project that I have taken over for
I have this large C++ project that I need to build on a platform
So for this one project, we have a bunch of queries that are executed
I have a project that is stored in a Subversion repository. In this repository,
Im sure this will be a simple one but have a project that started
We have old .net 1.1 project that is using a third party component. Aparently
I have this project set up with EF4 and I'm using LINQ to Entities
In a project using NHibernate, I have this class : public class AdminVAT :
I have this tiny Qt project with a project file like this: TEMPLATE =
We have this constant discussion in our project as to the granularity of our

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.