c# - structure have Application entry point -
why not implementing in general, application entry point main
within in structure.
with refrence c# specification 5.0 §3.1 application startup
can define entry point inside structure eg
using system; using system.windows.forms; namespace sampleapp { struct program { /// <summary> /// main entry point application. /// </summary> [stathread] static void main() { application.enablevisualstyles(); application.setcompatibletextrenderingdefault(false); application.run(new form1()); } } }
though struct
implicitly sealed
,then factors make main
should not be declared inside structure.
Comments
Post a Comment