Xceed .NET Libraries Documentation
Delete(FileSystemEvents,Object) Method


Xceed.FileSystem Assembly > Xceed.FileSystem Namespace > FileSystemItem Class > Delete Method : Delete(FileSystemEvents,Object) Method
A FileSystemEvents object that will be used to raise events. Cannot be a null reference (Nothing in Visual Basic).
Opaque data that will be passed back to the event handler when an event is raised.
Permanently deletes the physical item, and raises events during the process.
Syntax
'Declaration
 
Public Overloads Sub Delete( _
   ByVal events As FileSystemEvents, _
   ByVal userData As Object _
) 
'Usage
 
Dim instance As FileSystemItem
Dim events As FileSystemEvents
Dim userData As Object
 
instance.Delete(events, userData)
public void Delete( 
   FileSystemEvents events,
   object userData
)

Parameters

events
A FileSystemEvents object that will be used to raise events. Cannot be a null reference (Nothing in Visual Basic).
userData
Opaque data that will be passed back to the event handler when an event is raised.
Remarks

If this FileSystemItem object represents a file, the file is deleted. If it represents a folder, the folder and all it's content is deleted.

If the physical item does not exist, an exception is thrown.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

FileSystemItem Class
FileSystemItem Members
Overload List