title: C# assign const member with function
body: <p>in java its possible to do something like this</p>
  
  <pre><code>class {
      final int x = Random.randomInt();
      final int y = Random.randomInt();
  }
  </code></pre>
  
  <p>...</p>
  
  <pre><code>switch (intVariable)
  {
      case x: break;
      case y: break;
  }
  </code></pre>
  
  <p>as long as generateInt is final, this compiles.</p>
  
  <p>is there an equivalent in C#?</p>
  
  <p>edit: you might ask why i dont use concrete values or enums, but i have my reasons why the values are be random. ;)</p>