Why we put main()
method always inside the class
in C# while in c++ it always placed outside of the class
.
For historical reasons. C++ evolved from C, which had a global main()
function. C# is much younger and was designed from scratch. One of the design features of C# is the absence of global functions, so the main
function has to belong to a class.