摘要: C#设置系统日期和时间的代码分享,使用C#代码设置系统日期和时间的程序开发步骤如下:(1)为了使用DllImportAttribute类,需要引入命名空间:using System.Runtime.InteropServices;(2)自定义类SetSystemDateTime用于设置系统时间。代码如下: public class SetSystemDateTime { [DllImportAttribute( "Kernel32.dll" )] public static extern void GetLocalTime(SystemT... 阅读全文
posted @ 2011-10-22 23:37 把爱延续 阅读(19719) 评论(2) 推荐(1) 编辑