0
点赞
收藏
分享

微信扫一扫

C# 重新启动计算机

yundejia 2022-02-18 阅读 163

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 重新启动计算机
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine(“Hello, World!”);
Process.Start(“shutdown.exe”, "-r -t 0 -c " + “0s后关闭重启计算机” + " ");//弹出在0s后关闭重启计算机并执行
}
}
}

举报

相关推荐

0 条评论