I have a class called Product and a ArrayList called Products:
So I put the Product in the ArrayList:
How I can do this? (below)
Thanks.
Code:
public class Product
{
string strName;
public Product(string newName)
{
strName = newName;
}
public void DoStuff()
{
}
}
So I put the Product in the ArrayList:
Code:
ArrayList Products = New ArrayList();
Products.Add(new Product("Coke"))
How I can do this? (below)
Code:
Products[0].DoStuff();
Thanks.