Why we put main()
method always inside the class
in C# while in c++ it always placed outside of the class
.
The C++ language designers followed the lead of C and so the main function is a plain function.
The C# language designers made the choice, when designing the language, that all methods must be part of classes.
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