I know this is not tough but still I am facing a problem, I have created one console application Named Console Application, Under this application, there are two class one is Program.cs, Delegate.cs. When I am trying to run Delegate.cs but always running Program.cs. Even I tried to set the startup object from properties But there Delegate.cs is not appearing in Drop Down List. A code is here---
class program
{
public static void Main()
{
Console.WriteLine("I am from program.cs");
}
}
class Delegate
{
public static void Main()
{
Console.WriteLine("I am from Delegate.cs");
}
}
I am using Visual Studio 2015.
Maybe you need to:
Compile first (Ctrl+Shift+B)
Use another word instead of Delegate
Try giving your method an args parameter Main(string[] args)
It works for me:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With