I wrote a program which has two main method.And I specified entry point with Command Prompt.
class Program
{
static void Main()
{
Console.WriteLine("Test");
}
}
class Test
{
static void Main()
{
Console.WriteLine("Test");
}
}
csc Program.cs /main:Test
Well.Can I determine entry point method with command prompt?
for example
class Program
{
static void NewEntry()
{
Console.WriteLine("Test");
}
}
Then
csc Program.cs entry/Program::NewEntry()
Is this possible?
No. The static Main()
is the only entry point for C#, and all other functions should be called from it.