Deletes a file or directory to the recycle bin using the Shell. Optional confirmation dialog.
Namespace: System.Extensions.IOAssembly: System.Extensions (in System.Extensions.dll) Version: 0.0.0.5 (0.0.0.5)
Syntax
C# |
---|
public static void DeleteToRecycleBin(
this FileSystemInfo fileInfo,
bool showConfirmation
) |
Visual Basic |
---|
<ExtensionAttribute>
Public Shared Sub DeleteToRecycleBin (
fileInfo As FileSystemInfo,
showConfirmation As Boolean
) |
Visual C++ |
---|
public:
[ExtensionAttribute]
static void DeleteToRecycleBin(
FileSystemInfo^ fileInfo,
bool showConfirmation
) |
F# |
---|
static member DeleteToRecycleBin :
fileInfo : FileSystemInfo *
showConfirmation : bool -> unit
|
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
FileSystemInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also