title: C# switch clause on boolean variable
body: <p>I have a piece of code, that is checking if a boolean variable is true and based on the condition, I perform operations accordingly: </p>
  
  <pre><code>bool result = true;
  bool isTrue = false;
  CheckIsTrue(ref isTrue);
  
  if (result)
  {
     if (isTrue)
     //Perform action
  }
  </code></pre>
  
  <p>I have a need to perform another operation, if the variable is set to false:</p>
  
  <pre><code> if (result)
   {
      if (isTrue)
      {
        //Perform action
      } 
      else if(actionType == 6)
      {
        //Perform action, isTrue = false.
      }
   }
  </code></pre>
  
  <p>For readability and maintainability reason, I decided to change the above to:</p>
  
  <pre><code> if (result)
   {
       switch (isTrue)
       {
         case true:
                 //perform action on isTrue
             break;
                default:
                     switch (actionType)
                     {
                        case 6:
                           //Perform action on 6
                         break;
                            default:
                          //Perform default action        
                         break;
                     }
              break;
       } 
  }
  </code></pre>
  
  <p>My question is: is it smart to use <code>swicth.. case...</code> on boolean variables? 
  This is the best way I have considered to simplify my code, however I am not sure on how correct this truly is.</p>