namespace ConsoleApplication18
{
class Program
{
public Program()
{
Console.WriteLine("hi");
}
static void Main(string[] args)
{
Program p1 = new Program();
}
}
}
====
When i am running the above code then it is displaying the message:
Quote
hi
namespace ConsoleApplication11
{
class program
{
public hi()
{
Console.WriteLine("Hi");
}
static void Main(string[] args)
{
program k = new program();
}
}
}
but when i am running the above program considering the first example then it is displaying the following error:
Method must have a return type
====
Can anyone explain in detail?
Thank you.


Sign In
Create Account


Back to top









