zl程序教程

您现在的位置是:首页 >  其他

当前栏目

复制程序本身

程序 复制 本身
2023-09-14 08:58:58 时间

实现效果:

  

知识运用:

  File类的Copy方法

实现代码:

        private void Form1_Load(object sender, EventArgs e)
        {
            File.Copy(Application.ExecutablePath,@"C:\Copy_2.exe",true);
            label2.Text = @"C:\Copy_2.exe";
        }