title: Does the assignment operator in c# take any other value other than bool in any scenario?
body: <p>I recently started learning c# and got to know that the if condition takes only the boolean value for the assignment operator like in the below code. But I wanted to know if there is any scenario where if takes any value other than bool.</p>
  
  <p>I tried changing the type of 'a' to char but it gave me a compile time error.</p>
  
  <pre><code>Console.Write("Enter a character: ");
  char c = (char)Console.Read();
  bool a;
  if (a=Char.IsLetter(c))
  {
      if (a=Char.IsLower(c))
      {
          Console.WriteLine("The character is lowercase.");
      }
      else
      {
          Console.WriteLine("The character is uppercase.");
      }
  }
  else
  {
      Console.WriteLine("Not a character");
  }
  </code></pre>