Languages
[Edit]
EN

C# / .NET - file copy

14 points
Created by:
Root-ssh
177560

In C# / .NET it is possible to copy file in following way.

1. File.Copy method example

using System;
using System.IO;
					
public class Program
{
	public static void Main()
	{
		string srcPath = @"C:\path\to\file.txt";
		string dstPath = @"C:\path\to\file_copy.txt";

		File.Copy(srcPath, dstPath);
	}
}

Result:

  1. File.Copy Method - Microsoft Docs
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

C# / .NET - file API

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join