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?
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?
This might help you. Looks like you need to either add a reference to Microsoft.VisualBasic.dll or use P/Invoke.
I found this, don't know if it works, but it's worth a shot.
EDIT: Wise words from Nifle: Just remember to add a reference to Microsoft.VisualBasic.dll
Using
needs:
00:00:00.4036573
to delete one file. Usingonly needs:
00:00:00.1107684
to delete one file.An implementation can be found there: Send a File to the Recycle Bin
Have you got a
at the top of your page?
Basically, between the reference at the top and actually calling the method you need the full name (after adding the library of course)
You can either fully call it:
OR you can add the reference to the top with the others:
and then