There are 3 possibilities:
- your
list<string>
is null
- the object containing your
list<string>
is null
- the item you are inserting is null
1 is addressed when you assign a new List to it
2 and 3 we can not ascertain from the code you post here.
if you do not intend to allow assignment of a new list object outside of your class, then you do not, as noted elsewhere, need a setter. You can either remove it or declare it private or protected, like this....
public List<string> Baseline
{
get { return _Baseline; }
protected set { _Baseline = value; }
}