title: How can C# constructor assign value to read only property?
body: <p>I wrote a class property with only get accessor, like:</p>
  <pre><code>public int MyProp { get; }
  </code></pre>
  <p>I cannot assign any value to MyProp, not even privately, via method inside my class, i.e. it's not like if I had a private set.
  However, somehow, I can set a value to myProp using a constructor like:</p>
  <pre><code>public MyClass (int myProp) { this.MyProp = myProp; }
  </code></pre>
  <p>Is the constructor always immune to property accessor specifications? Are they valid only after the constructor runs?</p>