I created and launched Windows Service Service1 (with exe as MyService.exe) using C # 2005 .. I included the GetMyRandomNumber () method, which returns a random double value.
The problem is how to use this running service and how can I call the method.
I tried to add the MyService.exe link and access the as method -
Service1 s = new Service1();
MessageBox.Show(s.GetMyRandomNumber().ToString());
But I found that this method is not called from the executable instance of the service, i.e. although I am stopping the service performed by the operators.
Can someone explain to me how I can call the method to start the service instance.
Thank you for sharing your valuable time.
source
share