I have an object that has a List<String> as a member. I tried adding items to this list in the following way:
$myObject.MyList.Add("News")
$myObject.MyList.Add("FAQ")
$myObject.MyList.Add("Events")
But when I check:
$myObject.MyList.Count
It returns 0. Is there a different way I should be doing this?
Snippit from my source code:
[Personalizable(PersonalizationScope.Shared), WebBrowsable(false)]
public List<String> SelectedTabs
{
get;
set;
}
$myObject.MyListis definitely a List and not null etc. and that it is implimented such that it gives the same list each time it's accessed. Not for example:public MyList {get{return new List<string>();}}//Always returns a new list