title: In C# set value to a constant property
body: <p>I am partly modifying an application where I will need to set value of the following constant to the value of the environment variable <strong>if exists</strong>.</p>
  
  <p>What I already have: </p>
  
  <pre><code>private const string BuildPackagePath = @"\\server\build\";
  </code></pre>
  
  <p>What I would like to do is:</p>
  
  <pre><code>if (Environment.GetEnvironmentVariable("EnvVar") != null)
  Set the property value to = Environment.GetEnvironmentVariable("EnvVar")
  else
  {Keep default/assigned value}
  </code></pre>
  
  <p>I understand that the left side of an asignment has to be a variable. I will probably have to change the type but was just wondering if anyone could give me an idea so the structure of current code can be kept as is.</p>