I do you set and get a list of type class program property in Main ? if I do I get an Exception?
public class Person
{
public List<Person> Children { get; set; }
public string Names { get; set; }
}
static void Main(string[] args)
{
var person = new Person
{
Names = "King"
};
person.Children.Add(new Person()); // Null Reference Exception
}