I have the following questions to ask about the 'generated' code I have seen so far:
1. I have seen static void Main() method in a file called program.cs. Does this
instantiate an object or is this just 'class' library code? Please explain.
2. I have seen where the same solution can have several static void Main() method
in a file called program.cs. Basically there several of this program.cs files. Thus,
can you tell me why you would see so many and how can the code be setup to know what
program.cs to use?
Loading
John WiesePosted Jun 3, 2010, 9:54 AM
If you go into the project settings you will see there is a Startup Object entry on the Application tab. Here you could change the startup class to something other than APPNAME.Program.
For more info see this reference: http://msdn.microsoft.com/en-us/magazine/cc164014.aspx
And this one: C# Programmers Reference for Main()