The Move method moves an existing file to a new location with the same or a different file name. The Move method takes two parameters. The Move method deletes the original file.
The following code snippet moves the source file to the destination file.
string sourceFile = @"C:\Temp\MaheshTX.txt";string destinationFile = @"C:\Temp\Data\MaheshTXMoved.txt";try{ File.Move(sourceFile, destinationFile);}catch (IOException iox){ Console.WriteLine(iox.Message);}
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: