请教!c#程序运行无反应
写了个到点自动关机的程序,运行起来没有反应,请大家帮忙检查下,自己感觉代码没问题,搞不懂了!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Timers;
using System.Diagnostics;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{ Timer time1=new Timer();
time1.Interval = 60000;
time1.Elapsed += new ElapsedEventHandler(time1_Elapsed);
time1.Enabled = true;
time1.AutoReset = true;
time1.Start();
}
static void time1_Elapsed(object sender, ElapsedEventArgs e)
{
DateTime current = new DateTime();
current = DateTime.Now;
if (current.Hour>=19|current.Hour<6)
{
Process.Start("shutdown", "-s -f -t 60");
}
}
}
}
请大家指教!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Timers;
using System.Diagnostics;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{ Timer time1=new Timer();
time1.Interval = 60000;
time1.Elapsed += new ElapsedEventHandler(time1_Elapsed);
time1.Enabled = true;
time1.AutoReset = true;
time1.Start();
}
static void time1_Elapsed(object sender, ElapsedEventArgs e)
{
DateTime current = new DateTime();
current = DateTime.Now;
if (current.Hour>=19|current.Hour<6)
{
Process.Start("shutdown", "-s -f -t 60");
}
}
}
}
请大家指教!
...全文
相关推荐
DNGuard_HVM_脱壳工具.zip
不会用不要乱弄 专去HVM壳10和11运行不了 打开没反应记得换xp系统或在VM下操作
Unity使用C#开发时常会遇到一些问题,比如在C#中无法引入Input、双击Unity中的C#文件无反应,以及设置刚体后无效等
在上述示例中,我们首先通过GetComponent方法获取物体上的刚体组件,并将其赋值给变量rb。Unity使用C#开发时常会遇到一些问题,比如在C#中无法引入Input、双击Unity中的C#文件无反应,以及设置刚体后无效等。本文将详细介绍这些问题的解决方法,并提供相应的源代码和描述。在Unity中,有时候在代码中设置了刚体的属性,但却无效果。当在C#脚本中无法引入Unity的Input类时,可能是因为没有添加正确的命名空间。通过以上解决方法,我们可以解决在Unity中使用C#开发遇到的一些常见问题。
Unity使用c#开发遇上的问题(一)(c#中无法引入input,双击unity中的c#文件无反应,unity中刚体设置后仍然穿越问题)
1.c#中无法引入input 2.双击unity中的c#文件无反应 3.unity中刚体设置后仍然穿越问题
打开程序无反应或提示配置系统未能初始化
打开程序无反应或提示配置系统未能初始化
c#写的日历插件,已生成dll
c#写的日历插件,已生成dll,但是引用就是没反应,求大家提供个解决方法


