I tried to pass parameters to a windows service.
Here is my code snippet:
class Program : ServiceBase { public String UserName { get; set; }
Use Environment.GetCommandLineArgs()