title: How to make a variable able to be set only once in C#?
body: <p>I want to declare a variable, and assign it later, but I want the variable to be able to be assigned once.</p>
  <p>The <code>readonly</code> keyword doesn't do this. The documentation says:</p>
  <blockquote>
  <p>assignment to the field can only occur as part of the declaration or in a constructor in the same class.</p>
  </blockquote>
  <p>The <code>const</code> keyword also doesn't do this.<br />
  So how do I make a variable able to be set only once?
  Thanks in advance!</p>