title: How do I add an enum to the new console template in C# for Visual Studio 2022 for net6.0?
body: <p>If I add an enum to the default code for a new c# Console App:</p>
  <pre><code>// See https://aka.ms/new-console-template for more information
  enum testEnum
  {
      one = 1,
      two = 2
  }
  Console.WriteLine(&quot;Hello, World!&quot;);
  </code></pre>
  <p>I get the following error on the Console.WriteLine line: <br/>
  <strong>Error CS8803  Top-level statements must precede namespace and type declarations.</strong></p>
  <p>Moving the enum to the bottom of the code fixes the error.
  Is there a way to keep the enum at the top and get rid of the error?</p>