title: Can't convert from void to bool compile error
body: <p>I am having some trouble with visual studio, as it says it won't compile. I can't figure out what the problem is. it says something like it can't convert from void to bool, even though there is no 'bool'. Here is my code:</p>
  
  <pre><code>using System;
  
  namespace ConsoleApplication14
  {
      class Program
      {
          static void Main(string[] args)
          {
              Console.WriteLine(myFunction(14));
          }
  
          public static void myFunction(int x)
          {
              return x + 2;
          }
      }
  </code></pre>
  
  <p>What is causing that compile error?</p>