using System.Diagnostics; namespace SD { class Program { static void Main(string[] args) { //-s:关机(默认为30秒) -t:设置需要多长时间关机 30:关机时间秒数 Process.Start("shutdown", "-s -t 30"); } } }
Powered by: 博客园 Copyright © 2024 小亓学习辅助园 Powered by .NET 8.0 on Kubernetes