using System.Diagnostics; namespace SD { class Program { static void Main(string[] args) { //-s:关机(默认为30秒) -t:设置需要多长时间关机 30:关机时间秒数 Process.Start("shutdown", "-s -t 30"); } } }
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3