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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:47:33+00:00 2026-06-08T19:47:33+00:00

I have a array list private ArrayList rps = new ArrayList(); now below code

  • 0

I have a array list

private ArrayList rps = new ArrayList();

now below code is working fine in 2005 but not in visual studio 2008

int min = Convert.ToInt32(rps.Item(0));
int max = Convert.ToInt32(rps.Item(rps.Count - 1));

Error: System.Collections.ArrayList does not contain a definition for ‘Item’ and no extension method ‘Item’ accepting a first argument of type ‘System.Collections.ArrayList’ could be found (are you missing a using directive or an assembly reference?`

  • 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-08T19:47:35+00:00Added an answer on June 8, 2026 at 7:47 pm

    That code wouldn’t work in VS 2005 either. Something similar might work in VB, but not in C#. The C# code would be:

    int min = Convert.ToInt32(rps[0]);
    int max = Convert.ToInt32(rps.Item[rps.Count - 1]);
    

    However, I’d advise you to start using generic collections such as List<T> instead.

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

Sidebar

Related Questions

I have an array list of objects in my application. private static ArrayList<Player> userList=new
I have a array list like this: private ArrayList<Locations> Artist_Result = new ArrayList<Location>(); This
I have the following in my Struts ActionForm private List<FormFile> attachmentList = new ArrayList<FormFile>();
I have an array list: private ArrayList<PerfStatBean> statFilterResults; I want to iterate through it
In my app I have an array List<Friends> friends =new ArrayList<Friends>(); where Friends is
I have written such the code below that ; I have an array list
I have an array of strings var controlsToGet = new[] {lblHome,lblContact}; I have List<LanguageControl>
I have an arraylist called 'pri1', I want this array list to be available
I have created a JSON object like this: static ArrayList<item> list = new ArrayList<item>();
I have the following array: private int[,] testSamples = new testSamples[101,101]; It's supposed to

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.