C# Programming
11-29-2009, 05:30 PM
I have a class that inherits System.ServiceProcess.ServiceBase and is overriding the OnStart (string[] args) method. Where do I call base.OnStart(args)? At the beginning of the method or at the end?
protected override void OnStart(string[] args)
{
// Do Stuff
base.OnStart(args);
}
Or:
protected override void OnStart(string[] args)
{
base.OnStart(args);
// Do Stuff
}
protected override void OnStart(string[] args)
{
// Do Stuff
base.OnStart(args);
}
Or:
protected override void OnStart(string[] args)
{
base.OnStart(args);
// Do Stuff
}