- using System.ServiceProcess;
- public class MyService : ServiceBase
- {
- public MyService()
- {
- this.ServiceName = "MyServiceName";
- }
- protected override void OnStart(string[] args)
- {
- // Code to start your service
- }
- protected override void OnStop()
- {
- // Code to stop your service
- }
- }
Recent Pastes