I wrote a service in C#, and I overrode the function OnStop.
Will this function be called when I restart the service, or only when I stop it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes when you restart the service is called
and then :
The “OnStop” event handler
The “OnStop” event handler is being triggered when the EventLogger Service is being stopped or restarted.