I'm having troubles in adding into an array. I have created a class named Products:
public struct newProducts
{
public string productBrand;
public string productType;
public string productName;
public string productFlavour;
public int productSize;
}
//Create an array of type newProducts
newProducts[] productList = new productList[];
and than I've created a function:
public newProducts AddProduct(string brand, string type, string name, string flavour, int size)
{
//I don't know what to do here..
return productList;
}
What I want to do is to append and store the brand, type, name, flavour and size values to the array
Basically the first time I call this function I'll enter those values and store it to index 0 and on the second call it will add them to index 1 .
Is this possible?