How to Move files to the recycle bin
问题 I need to Move a file to recycle bin in .net 2003 I added microsft.visualbasic.runtime dll from refrence, but I could not able to get filesystem.deletedirectory, So what to do..Can any one help me? 回答1: I found this, don't know if it works, but it's worth a shot. using Microsoft.VisualBasic; string path = @"c:\myfile.txt"; FileIO.FileSystem.DeleteDirectory(path, FileIO.UIOption.OnlyErrorDialogs, RecycleOption.SendToRecycleBin); EDIT: Wise words from Nifle: Just remember to add a reference to