DataObject.SetFileDropList Method (StringCollection)

 

Adds a collection of file names to the data object in the FileDrop format.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public virtual void SetFileDropList(
	StringCollection filePaths
)

Parameters

filePaths
Type: System.Collections.Specialized.StringCollection

A StringCollection containing the file names.

Exception Condition
ArgumentNullException

filePaths is null.

A file drop list is a collection of strings containing path information for files.

A file drop list is stored in a data object as a String array. This method converts filePaths to a String array before adding it to the data object.

To retrieve a file drop list from the data object, first use the ContainsFileDropList method to determine whether the data object contains data in that format before retrieving it with the GetFileDropList method.

.NET Framework
Available since 2.0
Return to top
Show: