How are properties for a Collection set?
I\'ve created a class with a Collection properties. I want to add to the List anytime I set a new value. Using _name.Add(val
Your setters are strange, which is why you may be seeing a problem.
First, consider whether you even need these setters - if so, they should take a List, not just a string:
set
{
_subHead = value;
}
These lines:
newSec.subHead.Add("test string");
Are calling the getter and then call Add on the returned List - the setter is not invoked.