ArrayList.Item using Visual Studio 2003, is there something I need to get ...

  • Thread starter Thread starter Brian Underhill via DotNetMonster.com
  • Start date Start date
B

Brian Underhill via DotNetMonster.com

Is the .Item property not availible or is it called something else? How
would you get an indexed value from an arrayList?

for(j=0;j<3;j++)
{
arrayvalue=MyarrayList.Item(j);
}
 
Is the .Item property not availible or is it called something else? How
would you get an indexed value from an arrayList?

You use it with indexer syntax: MyarrayList[j]


Mattias
 
Brian Underhill via DotNetMonster.com said:
Is the .Item property not availible or is it called something else? How
would you get an indexed value from an arrayList?

for(j=0;j<3;j++)
{
arrayvalue=MyarrayList.Item(j);
}

The Item property is the indexer in C#:

arrayvalue = MyarrayList[j];
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top