static void Main(string[] args) { var server = new ServerClass(); server.ServerPipeMonitor(); Console.ReadKey(); }
static async Task Main(string[] args) { var server = new ServerClass(); await server.ServerPipeMonitor(true); Task clpmTask = Task.Run(() => server.ServerPipeMonitor()); Console.ReadKey(); }