As Richard already pointed out, an application should have a unique entry-point; said that, you can have two different classes that exposes a method with the right signature to be an entry point, but it is not a good practice as it generates ambiguity, and you need to explicitly tell the compiler which one to use as entry-point.
Anyway, if you write something like the code snipped below:
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
class Program1
{
static void Main(string[] args)
{
}
}
class Program2
{
static void Main(string[] args)
{
}
}
}
When you try to compile the application you get an error from the compiler, because it is not able to choose the entry-point between
Program1.Main
and
Program2.Main
.
To make the application compile without errors, you should open its properties and from the combo-box named startup object you have to choose one of the two possible ones.