The Main
method is the entry point of a C# console application. Thus, for example, if I have to start some threads or services, I will do it within the Ma
The Main for a WPF application is autogenerated and can be found in one of the .cs files that backs your App.xaml file. You can expand App.xaml -> App.xaml.cs -> App -> Main() in the solution explorer, which will get you to the App.g.i.cs source file, which contains your Main() function.
This file is auto-generated, so rather than editing the Main there, I would recommend creating a new .cs file in your project that contains the Main() function. You then have to change the properties of your project to specify the correct startup object. This is done on the Application tab in your project properties. Set it to the class that contains your custom Main function.
You probably want to copy the contains of the autogenerated Main into your new one, since you want your application to behave normally (show the main window, etc.).