title: Changing a source file to compile Main() method in a project, in VS c# console application
body: <p>I have  a sample c# console project in which I have 2 program files:</p>
  
  <ol>
  <li>Program.cs </li>
  <li>Program02.cs</li>
  </ol>
  
  <p>In <em>Program.cs</em> I have the usual main method that is the entry point of the project:</p>
  
  <pre><code>public static void main(string[] args)
  {
      Console.WriteLine("hello world from Program.cs");
  }
  </code></pre>
  
  <p>But I would like to make the execution of the program from the <em>Program02.cs</em> file so I added in the file the method.</p>
  
  <pre><code>public static void main(string[] args)
  {
      Console.WriteLine("hello world from Program02.cs");
  }
  </code></pre>
  
  <p>Clearly it doesn’t work, the entry point/execution of the project starts at <em>Program.cs</em>, how can I switch the main execution method to the <em>Program02.cs</em> file?</p>
  
  <p><img src="https://i.stack.imgur.com/VXwZT.jpg" alt="enter image description here">
  <img src="https://i.stack.imgur.com/6bjUk.jpg" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/jBTbC.jpg" alt="enter image description here">
  <img src="https://i.stack.imgur.com/DD5Uw.jpg" alt="enter image description here"></p>