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
Your main entry point is an override of OnStartup in the code-behind of App.Xaml :
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
// here you take control
}
}
Other points of interest might be Application.OnActivate() and the Loaded and Initialized events of your MainWindow.
If I have to start some threads or services, where should write the code for starting them?
Depends on what those threads/services need and want.