title: Assign a value to an explicitly-implemented readonly interface property in a constructor
body: <p>Same question <a href="https://stackoverflow.com/questions/30672761/explicit-implementation-of-an-interface-using-a-getter-only-auto-property-c-6">as this one</a>, but for C# 7.0 instead of 6.0:</p>
  
  <p>Is there a way to assign a value to an explicitly-implemented read-only (getter only) interface property in a constructor?  Or is it still the same answer, i.e. use the backing-field work-around?</p>
  
  <p>For example:</p>
  
  <pre><code>interface IPerson
  {
      string Name { get; }
  }
  
  class MyPerson : IPerson
  {
      string IPerson.Name { get; }
  
      internal MyPerson(string withName)
      {
          // doesn't work; Property or indexer 'IPerson.Name' 
          // cannot be assigned to --it is read only
          ((IPerson)this).Name = withName; 
      }
  }
  </code></pre>
  
  <p>Work-around:</p>
  
  <pre><code>class MyPerson : IPerson
  {
      string _name;
      string IPerson.Name { get { return _name; } }
  
      internal MyPerson(string withName)
      {
          _name = withName; 
      }
  }
  </code></pre>