title: Returning Exception in Boolean method C#
body: <p>Below is the Code Sample which explains my issue:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  
  namespace ConsoleApplication2
  {
      class Program
      {
          static void Main(string[] args)
          {
              try
              {
                  Program.Sample();
                  Console.ReadLine();
              }
              catch (Exception)
              {
                  Console.WriteLine("InvalidOperation Exception");
              }
          }
  
          static bool Sample()
          {
              int a = 1; int b = 2;
              if (a == b) //Some Condition checking
              {
                  return true;
              }
              else
              { //Is this Proper returning Exception In Boolean method instead of False
                  throw new InvalidOperationException();
              }
          }
      }
  }
  </code></pre>
  
  <p>I am catching this Exception in Client Applications and Displaying an Message I would like to know whether this is proper way of doing it or not?</p>