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

We have a project that’s using many C++11 facilities, and we thought about this
I'm using .net 2.0. This is a project that I have taken over for
I have successfully implemented slider to my Cocos2D project using this resource . The
I have this task for the project with 4 nested subprojects using Maven: For
We have an ADP project created several years ago using Access 2000. This project
I have a Unit test project for my Application using DUnit framework. This project
I write a project using Prism . I have tow modules and this modules
I have an audio project I'm working on using BASS from Un4seen. This library
I'm using this jquery plugin ajaxFileupload in our project. My design is I have
I have a project that currently compiles happily on my dev machine using VS

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.