As mentioned above you need a Main method.
The syntax above is not C# however and I think somebody got lost from his C++ forum :D
The default C# main method is the following:
static void Main(string[] args)
{
// Code goes here
}
This is occuring in your case as it looks like you are trying to create classes for a ClassLib however the project will be console based and therefore you still need a Main program class in order for it to build. The other option is to make a Class Library project which does not require the Main
method to build.
You can make a new class that looks like the following:
namespace Lesson02
{
class MainProgramClass
{
static void Main(string[] args)
{
Console.WriteLine("Running");
Console.ReadLine();
}
}
}
and it should compile then.