using System; using System.Collections.Generic; using System.ComponentModel; using System.Configuration; using System.Data; using System.Diagnostics; using System.IO; using System.Linq; using System.ServiceProcess; using System.Text; using System.Threading.Tasks; using System.Timers; namespace solarWinService { internal static class Program { //從App.config取出檔案路徑及名稱 //private readonly string _FilePath = ConfigurationManager.AppSettings["FilePath"]; /// /// 應用程式的主要進入點。 /// static void Main() { ServiceBase[] ServicesToRun; ServicesToRun = new ServiceBase[] { new Service1() }; ServiceBase.Run(ServicesToRun); } } }