DOS命令关闭计算机

        今天在逛CSDN时,有人问在C#中怎么关闭操作系统的文章,有网友说使用shutdown命令,感觉很新鲜,故试了一下果然好使。
现贴出用法。
        shutdown用法:
                 shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "comment"] [-d up:xx:yy]

         具体参数是什么意思,自己敲cmd去看吧。
    
           C#代码:
                System.Diagnostics.Process.Start("shutdown", "-f -s");
原文地址:https://www.cnblogs.com/Lewis/p/1120361.html