title: How to limit property setter to NOT receive values below zero?
body: <p>I am doing homework and am stuck with a property that I need to make to not receive negative values.</p>
  
  <p>I have this code for the property. How do I set the setter not to let the user set a negative value?</p>
  
  <pre><code>     public decimal Balance 
          { 
          get {return balance;}
          private set{ if (value &gt;= 0) 
          {
              balance = value;
          }else if (value &lt; 0)
          {
             ??????
          }
          }
      }        
  </code></pre>
  
  <p>This here is my Main() method:</p>
  
  <pre><code>  static void Main(string[] args)
      {
          BankAccountClass firstAccount = new BankAccountClass();
          int userInputAccountNumber = int.Parse(Console.ReadLine());
          firstAccount.addAccountNumber(userInputAccountNumber);
  
          Console.WriteLine(firstAccount.AccountNumber);
  
  
      }
  </code></pre>