Possible Duplicate:
VB.NET to C# – my.computer.getfiles()
Can any one tell me the equivalent of following vb.net code ‘My.Computer’ methods in C#.?
My.Computer.FileSystem.RenameFile(oldname,newname)
My.Computer.FileSystem.DeleteFile(filename)
Thanks in advance..
From the documentation
You can use
System.IO.Fileto do most of the things that my limited knowledge of VB saidMy.Computer.FileSystemcould do.The methods are still static, and take in the path of the file you wish to manipulate. So for the examples you provided…