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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:04:24+00:00 2026-06-04T15:04:24+00:00

I have problem with this. I have one arrayList, and I want to copy

  • 0

I have problem with this.
I have one arrayList, and I want to copy some objects to another. More important, each object has a specific property, which I’m using it as filter to copy.
Unfortunately, I have to work with .NET 1.1, so I can’t use lamda expressions.

Do you have any idea to do this?
I want to make this good. I have solution, just use foreach loop, but I want to make this as good optimize as I can.

Sorry for my english.

ArrayList list = new ArrayList();
//Insert to list few objects
ArrayList specificList = get few objects from list using filter. For example Object.Name
  • 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-04T15:04:26+00:00Added an answer on June 4, 2026 at 3:04 pm

    Use Traditional loops for .Net 1.1

    You said but I want to make this as good optimize as I can.

    Loops are best optimizer when iterating over a collection as compared to LINQ.

    Based on your example you can do this.

    ArrayList list = new ArrayList();
    //Insert to list few objects
    
    ArrayList specificList = new ArrayList(); 
    
    for (int i = 0; i < list.Count ; i++)
    {
        if (((MyObject)list[i]).Name.Contains("ogrod87"))
            specificList.Add(list[i]);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My problem is this one, I am using Sharepoint 2010, I have a form
I have a problem with my WCF Data Service, and this one is just
So i'm having this problem. I have two tables (Oracle), one is called Destination
This is a thought problem, and one I have been wrestling with for about
This is my problem, I have one textbox, one button and one label. Everything
I have a problem with comparing two arraylist, my first arraylist looks like this:
I have an ArrayList of objects (A class called OrderItem). OrderItem has a toString()
I'm training code problems like UvA and I have this one in which I
I have problem with this code: file = tempfile.TemporaryFile(mode='wrb') file.write(base64.b64decode(data)) file.flush() os.fsync(file) # file.seek(0)
Hi i have problem with this code, i found it on the internet and

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.