title: c# assign conditional value to class member
body: <p>is there any way to assign conditional value to a class member within same class?</p>
  
  <pre><code>public class getStudent
  {
  private bool itsOkay = false;
  private short stID = 0;
  
  public bool ValusOkay
      {
          get  {return itsOkay;}
          set  {itsOkay = value;}
      }
   public short STid
      {
          get {return stID;}
          if(itsOkay == true)
             set {stID = 8;}
          else
             set {stID = 0;}
      }    
  }
  </code></pre>
  
  <p>Thank you in advance.</p>