title: Call a public bool as a public void
body: <p>I have an issue I would like to do a public bool in a public class and call it as a void.</p>
  
  <p>I would like to check if the bool in a second class is true or not.</p>
  
  <p>For example in my first class: </p>
  
  <pre><code>public class GetWindow
  {
     public string Check { get; set; } 
  
     public bool checkwindow()
     {
         if (Listofwindows.Contains(Check))
           return true;
         else
           return false;
     }
  }
  </code></pre>
  
  <p>And the second one:</p>
  
  <pre><code>public Form1()
  { [...]
  
    GetWindow myprogram1 = new GetWindow();
    myprogram1.Check = "Kin"; 
  
    if (myprogram1.checkwindow == true) 
          {/*Do thing*/}
  }
  </code></pre>
  
  <blockquote>
    <p>Obvisouly it doesn't work because of <code>myprogram1.checkwindow</code> it says:</p>
    
    <p>Cannot convert method group 'checkwindow' to non-delegate type bool</p>
  </blockquote>
  
  <p>"Operator '==' cannot be applied to operands of type 'group of methods' and 'bool'</p>
  
  <p>Because of <code>myprogram1.checkwindow == true</code>.</p>
  
  <p>So it seems dead to do it this way but i have no idea no idea how to do it differently! (i need my getwindow class.)</p>