Sometimes you might want to let the designer serializer serialize the changes in base fields via a property rather than the field itself using the AccesssedThroughProperty attribute as follows:
public class MyBaseForm : Form
{
[AccessedThroughProperty('MyList')]
private ArrayList myList;
public ArrayList MyList
{
return this.myList;
}
}
Then when the above form is inherited and items get added to the inherited form’s designer, code will be added as follows in the inherited form’s InitializeComponent:
private void InitializeComponent()
{
... ... ... ...
this.MyList.Add(aNewItem);
... ... ... ...
}
Share with