0

initializing the value in constructor or variable declaration? Which one is better (or good practice) and why?

class checker 
{   
   public bool exit_code_1 = false; 
}

or

class checker
{
  public bool exit_code_1;
  public checker()
  {
     exit_code_1 = false;
  }
}
4

0 回答 0