title: Adding a setter to a virtual property in C#
body: <p>I have a situation like this:</p>
  
  <pre><code>public abstract class BaseClass 
  {
     public abstract string MyProp { get; }
  }
  </code></pre>
  
  <p>Now, for some of the derived classes, the properties value is a synthesized values, so there is no setter:</p>
  
  <pre><code>public class Derived1 : BaseClass
  {
      public override string MyProp { get { return "no backing store"; } }
  }
  </code></pre>
  
  <p>This works fine.  However, some of the derived class required a more traditional backing store.  But, no matter how I write it, as on automatic property, or with an explicit backing store, I get an error:</p>
  
  <pre><code>public class Derived2 : BaseClass
  {
      public override string MyProp { get; private set;}
  }
  
  public class Derived3 : BaseClass
  {
      private string myProp;
      public override string MyProp 
      { 
          get { return myProp;} 
          private set { myProp = value;}
      }
  }
  </code></pre>
  
  <p><strong>Derived2.MyProp.set': cannot override because 'BaseClass.MyProp' does not have an overridable set accessor</strong></p>
  
  <p>How do I get this to work??</p>