I wrote a windows service in C# that does some functionality (a public method) after reading a file at regular intervals. Is it possible for me to use this functionality from another C# application ? If possible, please give a solution based on .net 2.0 as well as .net 3.0
Thanks
The cleanest option would be to write that functionality in a separate assembly (dll) that you use from both the service and the second .NET application.
You can reference the service assembly (even if it is an exe, in VS2008 at least) – but it seems a little overkill.
If you want to execute the method in the context of the running service, then you’ll need some IPC (perhaps WCF or sockets).