title: How to make conditions with IF statement right?
body: <p>I have question about my IF statement, it just doesn't work :D
  I want to check ID, age and salary, if it's bigger than 0, but my code just ignore that, would like to change 0 to some meanings like - if age &lt;= 0 set age = 21 etc
  Will glad to see your answers.
  Thank you!</p>
  <pre><code>class Person
  {
      private int _age;
      private string _firstName;
      private string _lastName;
      private int _id;
  
      public Person(int age, string firstName, string lastName, int id)
      {
          _age = age;
          _firstName = firstName;
          _lastName = lastName;
          _id = id;
      }    
      
      public int GetAge()
      {
          return _age;
      }
      public void SetAge(int age)
      {
          if (_age == 0)
              _age = 21;
          else
              _age = age;
      }
      public int GetId()
      {
          return _id;
      }
      public void SetId(int id)
      {
          if (id &gt; 0)
              _id = id;
          else
              _id = 1;
          
      }
      public void Print()
      {
          Console.WriteLine(&quot;Age: {0}\tFirst name: {1}\tLast name: {2}\tID: {3}&quot;, this._age, this._firstName, this._lastName, this._id);
      }
  }
  
  class TestInheritence
  {
      public static void Main(string[] args)
      {
          Employe[] employees = new[]
          {
              new Employe(21, &quot;John&quot;, &quot;Watson&quot;, 0)
          };
          employees[0].Print();
      }  
  }
  </code></pre>