⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 class1.cs

📁 修改系统时间 修改系统时间 修改系统时间 修改系统时间
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace ConsoleApplication2
{
    public struct SYSTEMTIME
    {

        public ushort wYear;

        public ushort wMonth;

        public ushort wDayOfWeek;

        public ushort wDay;

        public ushort wHour;

        public ushort wMinute;

        public ushort wSecond;

        public ushort wMilliseconds;

        public void SetTime()
        {
            wYear = 2007;

            wMonth = 8;

            wDayOfWeek = 3;

            wDay = 8;

            wHour = 0;

            wMinute = 0;

            wSecond = 0;

            wMilliseconds = 0;
        }
    }
    public class Win32API

    {

        [DllImport("Kernel32.dll")]

        public static extern bool SetLocalTime(ref SYSTEMTIME Time );

        [DllImport("Kernel32.dll")]

        public static extern void GetLocalTime(ref SYSTEMTIME Time);

    }




        


    

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -