C#中文件移动演示源码

下边资料是关于C#中文件移动演示的内容。

using System;
using System.IO;
 
namespace Client.Chapter_11___File_and_Streams
{
  public class MovingAFiles {
    static void Main(string[] args)
    {
      FileInfo MyFile = new FileInfo(@"c:ProjectsTesting.txt");
 
      MyFile.Create();
      MyFile.MoveTo(@"c:ProjectsMyFolderMoved Testing.txt");
      MyFile.MoveTo(@"C:|projectsMyFolder");
    }
  }
}

猜你喜欢

转载自blog.csdn.net/weixin_44073507/article/details/86551788