Hello everyone,
My problem is that I am creating different objects, and I want them to add themselves to either a List or an ArrayList (difference?) without having to write insects.Add(spider); after each new object I create. How can I add this in the constructor of the insect class?
right now I have the following code for my constructor.
public Insect(int legs, int eyes, string species, string family)
{
this.legs=legs;
....and so on
}
I assume I have to add an ArrayList or List type to my insect class and then add something into my constructor that will add itself to the Array or List?
thank you for the help, just getting back into C# programming