What is the best way to recursively copy contents in C#?

后端 未结 3 2065
北海茫月
北海茫月 2020-12-06 10:31

What is the best way to recursively copy a folder\'s content into another folder using C# and ASP.NET?

3条回答
  •  误落风尘
    2020-12-06 11:06

    Just use Microsoft.VisualBasic.FileIO.FileSystem.CopyDirectory in Microsoft.VisualBasic.dll assembly.

    Add a reference to Microsoft.VisualBasic

    Microsoft.VisualBasic.FileIO.FileSystem.CopyDirectory(source, destination);
    

提交回复
热议问题