复制程序本身

实现效果:

  

知识运用:

  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";
        }

  

猜你喜欢

转载自www.cnblogs.com/feiyucha/p/10322270.html