Im working on a project for homework where I have an Arraylist containing objects of 5 strings. I know how to select items of the array list (using an index value) but not how to access the objects strings. Any help would be great (I'm not trying to cheat but its getting frustrating that I cant't sort it out. I hope this snippets make it obvious what i'm trying to do.
private ArrayList myComponents;
private int listIndex = 0;
myComponents = new ArrayList(); //Arraylist to hold catalog data
equipment = new Equipment(itemName, itemType, itemDetails, itemMaintenance, itemId);
myComponents.Add(equipment);
// class file is called Equipment.cs
//I know normally that equipment without the arraylist this would work: equipment.getitemName(); but combining with the arraylist is being problematic.