As you can see from MSDN documentation, all
System.Windows.Forms.Application.Run
methods are static, not virtual.
You cannot override non-virtual function, and in .NET a static function cannot be virtual (unlike some other platforms/languages).
As if it wasn't enough, the class
System.Windows.Forms.Application
is marked sealed, so, not only you cannot override the method you want, you cannot even define a class based on
Application
.
Please see
http://msdn.microsoft.com/en-us/library/system.windows.forms.application.aspx[
^].
You had no reason to ask this pointless question, because every one can look at documentation. If the answer was not apparent to you, it means that you should not do any UI development before you lean the simplest basics of OOP.
Even though this is pretty much useless, I nevertheless can explain what could you do to run application again. You could simply run
Application
with a different form, which then becomes a new main form. This trick is used sometimes, but I don't recommend it.
That said, you somehow mix up overrides with a simple non-OOP call, which means, you also need to learn some pre-OOP stuff: functions, parameters, function return, actual parameters, formal parameters, types, instances… pretty much everything…
When you feel comfortable, come back to UI development again. If you face a problem ask again; we will gladly help you.
—SA