CSharp .exe复制我该怎么办=? [英] CSharp .exe Copy How can I do =?

查看:110
本文介绍了CSharp .exe复制我该怎么办=?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好!程序本身在打开时的副本.我能怎么做 . ??

Hİ! Copies of the program itself when opened. how can i do . ??

private void Form1_Load(object sender, EventArgs e)
       {
            Copies of the program itself. C:/ (how can I do ?)
       }

推荐答案

使用 ^ ]获取当前路径和文件名,然后使用 ^ ]将文件复制到新文件夹.
也许使用路径类 [
Use Application.ExecutablePath Property[^] to get the current path and file name and then use File.Copy Method[^] to copy the file to a new folder.
Perhaps use Path class[^] to get something like folder it self or file name and then combine a new path before use of File.Copy.


File.Copy("MyApplication.exe", @"C:\path\MyApplication.exe");


这篇关于CSharp .exe复制我该怎么办=?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆