如图:
代码如下:
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![ExpandedBlockStart.gif](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
string
path
=
@"
c:\temp\MyTest.txt
"
;
string pathCopy = @" c:\temp\MyTestCopy.txt " ;
if (File.Exists(path))
{
File.Copy(path, pathCopy, true );
File.Delete(path);
}
string pathCopy = @" c:\temp\MyTestCopy.txt " ;
if (File.Exists(path))
{
File.Copy(path, pathCopy, true );
File.Delete(path);
}