How to hide the plumbings of program.cs
<p>In a typical winform program.cs contains the entry point:</p>

<blockquote>
<pre><code>     static void Main(string[] args) {

        Application.EnableVisualStyles();
        Application.SetCompatibleTextRenderingDefault(false);
        // the code goes on
</code></pre>
</blockquote>

<p>I want to create my own framework which hide the plumbings of all stuffs that has nothing to do with application domain so I'd like to be able to create a base class in an another namespace something like this</p>

<pre><code>namespace MyFramework
{
    public partial class Program
    {



        [STAThread]
        static void Main(string[] args)
        {

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);


            // the code goes on
</code></pre>

<p>And then in my app namespace program.cs inherit from the one above so that I can get rid off the Application.EnableVisualStyles and write only something like this</p>

<pre><code>        static void Main(string[] args): base()
        {
           //only app domain code
</code></pre>

<p>I can inherit from base class if I remove static attrib from both class but I am not able to remove static from main entry method so I cannot really finalize.</p>

<p>I don't want to use code behind to hide the plumbings because I need to port this to other languages that doesn't have code behind.</p>

<p>So is there a way to achieve this simple and legitimate goal with OOP (inheritance or not, static or not) only without using some big external framework ?</p>

<p>For example is there a way I could delegate main entry point to another class in the framework namespace ?</p>
