title: Const set property in C#
body: <p>I have a variable in a class which must have a <code>const</code> value.</p>
  
  <pre><code>private string query;
  </code></pre>
  
  <p>The value of <code>query</code> can be set only after constructor call. The class is not a <code>static</code> class so there cannot be a <code>Static Constructor</code> with the variable being <code>static readonly</code> like usual. I was wondering can something like below be achieved </p>
  
  <pre><code>private string Query { get; const set;}
  </code></pre>
  
  <p>or</p>
  
  <pre><code>private string Query { get; static readonly set;}
  </code></pre>
  
  <p>so that my purpose is solved.</p>
  
  <p>Or </p>
  
  <p>Can I declare the variable normally as </p>
  
  <pre><code>private string query;
  </code></pre>
  
  <p>and then in the constructor I can make the variable <code>query</code> as <code>const</code> while initializing, i.e., dynamically.</p>
  
  <p>Thanks in advance for any kind of help!!</p>