I have a c# question that im struggling with. I am designing a class but im not familiar with oop too much. Is it possible to define a list of the same type as the type of the class itself? For example say i have a dog class:
public class Dog
{
public string _name {get; set;};
public Dog (string, name)
{
_name = name;
}
public List<Dog> listOfDogs ()
{
// blah blah
}
}
Is such a structure possible? if so, how? Is it the proper way to do something like this? Or should i create another helper class that simply does the building of the list of dogs by creating separate dog objects?
Thanks