C# setting derived property from base
<p>I can't seem to call the setter of an overridden property in a derived class from the base class.  This seems like something that one should be able to do, but I am clearly missing something.  In the DisplayQuestion method of the SearchSurveyBase class below, this line does not appear to do any setting:</p>

<pre><code>VisibleQuestions.Add(sqc.SurveyQuestion.ID);
</code></pre>

<p>VisibleQuestions is an abstract List that is being overridden in a derived class.  The getters seem to work fine from the base; I can see them being hit on the derived class when debugging.  However, the setter does not appear to be working at all.  The getter is called fine, but the setter never sets.  What am I missing here?  Is there a better way to do this?</p>

<p>Base Class:</p>

<pre><code>public abstract class SearchSurveyBase : System.Web.UI.UserControl
{
    public abstract List&lt;int&gt; VisibleQuestions { get; set; }

    public abstract void SetupControls();

    protected void AddQuestion(Accordion accSection, Question question)
    {
        SearchQuestionControl searchQuestionControl = GetQuestionControl(question.ControlType);

        if (searchQuestionControl != null)
        {
            //QuestionVisible is a method that checks to see if the object's id is in the VisibleQuestions list
            searchQuestionControl.Visible = QuestionVisible(question);

            if (!searchQuestionControl.Visible)
            {
                string btnID = "lb_" + accSection.ID.ToString() + "_" + accSection.Panes.Count;
                LinkButton btn = new LinkButton();
                btn.ID = btnID;
                btn.Text = question.Text;
                btn.CommandArgument = questionPane.ID;
                btn.Command += new CommandEventHandler(DisplayQuestion);
                questionPane.HeaderContainer.Controls.Add(btn);
            }

            questionPane.ContentContainer.Controls.Add(searchQuestionControl);
            searchQuestionControlList.Add(searchQuestionControl);
        }
        accSection.Panes.Add(questionPane);
    }

    private void DisplayQuestion(object sender, CommandEventArgs e)
    {
        SearchQuestionControl sqc = null;
        AccordionPane pane = (AccordionPane)UIUtilities.FindControlRecursive(RootControl, e.CommandArgument.ToString());
        if (pane != null &amp;&amp; pane.ContentContainer.HasControls() &amp;&amp; pane.ContentContainer.Controls[0] is SearchQuestionControl)
        {
            sqc = (SearchQuestionControl)pane.ContentContainer.Controls[0];
        }

        if (sqc != null)
        {
            if (!sqc.Visible)
            {
                //Removed a bunch of lines that aren't relevant to the question per request.
                VisibleQuestions.Add(sqc.SurveyQuestion.ID);
            }
        }
    }
}
</code></pre>

<p>Derived Class:</p>

<pre><code>public partial class SearchSurveyAccordion : SearchSurveyBase
{
    override public List&lt;int&gt; VisibleQuestions
    {
        get
        {
            // hfVisibleQuestions is a HiddenField control on the .ascx page that inherits this class.
            if (!string.IsNullOrWhiteSpace(hfVisibleQuestions.Value))
            {
                string[] vals = hfVisibleQuestions.Value.Split(',');
                List&lt;int&gt; vqs = new List&lt;int&gt;(Array.ConvertAll&lt;string, int&gt;(vals, (x =&gt; Convert.ToInt32(x))));
                return vqs;
            }
            else
            {
                return new List&lt;int&gt;();
            }
        }
        set
        {
            hfVisibleQuestions.Value = string.Join(",", value.Select(n =&gt; n.ToString()).ToArray());
        }
    }

    // This method is called during the Page_Init of the page that is consuming this user control.
    override public void SetupControls()
    {
        if (base.survey != null &amp;&amp; base.survey.QuestionList != null &amp;&amp; base.survey.QuestionList.Count &gt; 0)
        {
            BuildAccordion(base.survey.QuestionList);
        }
    }

    private void BuildAccordion(List&lt;Question&gt; questionList)
    {
        Accordion accSection = null;
        foreach (Question question in questionList)
        {
            accSection = base.AddSection(accSurvey, defaultSectionHeader);
            AddQuestion(accSection, question);
        }
    }
}
</code></pre>

<p>TL;DR?  Here's the short version of the problem.</p>

<p>I have a base class and a derived class.  I want a method in the base class to be able to set the value of an abstract property that is overridden in the derived class but it isn't working for me.</p>
