Hi,
I have created and started windows service Service1 (with exe as MyService.exe) using c# 2005. . I have included a method GetMyRandomNumber() that returns a random double value.
The problem here is how could use this running service and how could i call the method.
I have tried adding reference of MyService.exe and access the method as -
Service1 s = new Service1();
MessageBox.Show(s.GetMyRandomNumber().ToString());
But found that the method is not called from the running instance of the service i.e. even though i stop the service the statements are executed.
Could someone explain me how can I call the method from running instance of the service.
Thanks for sharing your valuable time.