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

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

javascript - Backbone.js getting target attribute -

html - Repeat image to extend header to fill screen -