Languages
[Edit]
EN

C# / .NET - file copy

14 points
Created by:
Root-ssh
121100

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

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