473,382 Members | 1,252 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

"ArrayList does not contain a definition for Item" - Tell me I'm being stupid

error CS0117: 'System.Collections.ArrayList' does not contain a definition
for 'Item'

Only one answer in Google Groups, and I'm positive I'm using it
correctly...!

Posts is my ArrayList.

I put in some posts:

for (i = 0; i < 15; i++)
{
myPost = new Post();
myPost.Key = i;
myPost.Level = i;
myPost.Subject = "The Subject " + i.ToString();
myPost.Author = "Test " + i.ToString();
bottomControl.Posts.Add(myPost);
}

Try and get them back out

for (int i = 0; i < Posts.Count; i++)
{
Post aPost = Posts.Item[i];
}

To get the error at the top. Foreach works, but I need a count too, so this
loop seems the best way.

I'm sure I'm doing something really stupid, but I really just can't figure
out what! :o(

Thanks,
--
Daisy The Cow
Now playing: DJ Sammy - Sunlight [Bossa Nova Mix]
Nov 13 '05 #1
1 5939
"Daisy" <da***@nospam.oops> wrote in message
news:be**********@linux01.dannytuppeny.com...
error CS0117: 'System.Collections.ArrayList' does not contain a definition
for 'Item'


Yes, I was being stupid. I don't need Item!! Doh !

:O)
--
Daisy The Cow
Now playing: Clock - Oh What A Night
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: lkrubner | last post by:
I want to give users the power to edit files from an easy interface, so I create a form and a PHP script called "fileUpdate". It does a reasonable about of error checking and prints out some...
9
by: Lamont Sanford | last post by:
I'm reading a book on design patterns, and the author seems to enjoy using this word a lot. I've looked it up on Dictionary.com and still don't understand how it applies to the context of software...
2
by: barb28 | last post by:
Hello, sometimes I have noticed that in web addresses, the number: 20% will show up in the address. I think this is somehow related to a 'blank space', but am unsure, does anyone know about...
11
by: L. Chen | last post by:
The standard says that a char* or void* pointer has the least strict alignment. But I do not know what is a strict alignment. What does that mean?
10
by: Kobu | last post by:
My question is about the use and meaning of the terms "declaration" and "definition" as it pertains to the C language. I've read sources that mix the two up when talking about such things as...
1
by: sd | last post by:
QUESTION: How can my ASP page - which uses language="VBScript" - pass a "System.Collections.ArrayList" object - as a parameter - to a C# method in the middle-tier ??? ----- Is it possible at...
51
by: Tony Sinclair | last post by:
I'm just learning C#. I'm writing a program (using Visual C# 2005 on WinXP) to combine several files into one (HKSplit is a popular freeware program that does this, but it requires all input and...
5
by: mkaushik | last post by:
Hi everyone, Im just starting out with C++, and am curious to know how "delete <pointer>", knows about the number of memory locations to free. I read somewhere that delete frees up space...
1
by: Kyle Morris | last post by:
so the challenge is how to create a regex that validates a control when it doesnt contain particular words or phrases. I've used the validator plenty of times to validate correct input in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.