Why does the C# code below allow auto-implemented properties for a List type that then results in an object reference runtime error? I realize that I can implement the getter and initialize the List but would like to know if there is a reason behind the behavior.
class Program
{
static void Main(string[] args)
{
Foo foo = new Foo();
foo.FooList.Add(3);
}
}
class Foo
{
public List<int> FooList { get; set; }
}
}